View | Details | Raw Unified | Return to bug 243401 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/ahci/ahci.c (-4 / +8 lines)
Lines 2605-2614 static int Link Here
2605
ahci_sata_connect(struct ahci_channel *ch)
2605
ahci_sata_connect(struct ahci_channel *ch)
2606
{
2606
{
2607
	u_int32_t status;
2607
	u_int32_t status;
2608
	int timeout, found = 0;
2608
	int timeout, timeoutslot, found = 0;
2609
2609
2610
	/* Wait up to 100ms for "connect well" */
2610
	/*
2611
	for (timeout = 0; timeout < 1000 ; timeout++) {
2611
	 * Wait for "connect well", up to 100ms by default and
2612
	 * up to 500ms for devices with the SLOWDEV quirk.
2613
	 */
2614
	timeoutslot = ((ch->quirks & AHCI_Q_SLOWDEV) ? 5000 : 1000);
2615
	for (timeout = 0; timeout < timeoutslot; timeout++) {
2612
		status = ATA_INL(ch->r_mem, AHCI_P_SSTS);
2616
		status = ATA_INL(ch->r_mem, AHCI_P_SSTS);
2613
		if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE)
2617
		if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE)
2614
			found = 1;
2618
			found = 1;
Lines 2627-2633 ahci_sata_connect(struct ahci_channel *ch) Link Here
2627
			break;
2631
			break;
2628
		DELAY(100);
2632
		DELAY(100);
2629
	}
2633
	}
2630
	if (timeout >= 1000 || !found) {
2634
	if (timeout >= timeoutslot || !found) {
2631
		if (bootverbose) {
2635
		if (bootverbose) {
2632
			device_printf(ch->dev,
2636
			device_printf(ch->dev,
2633
			    "SATA connect timeout time=%dus status=%08x\n",
2637
			    "SATA connect timeout time=%dus status=%08x\n",
(-)sys/dev/ahci/ahci.h (-1 / +3 lines)
Lines 621-626 enum ahci_err_type { Link Here
621
#define AHCI_Q_NOCCS		0x00400000
621
#define AHCI_Q_NOCCS		0x00400000
622
#define AHCI_Q_NOAUX		0x00800000
622
#define AHCI_Q_NOAUX		0x00800000
623
#define AHCI_Q_IOMMU_BUSWIDE	0x01000000
623
#define AHCI_Q_IOMMU_BUSWIDE	0x01000000
624
#define AHCI_Q_SLOWDEV		0x02000000
624
625
625
#define AHCI_Q_BIT_STRING	\
626
#define AHCI_Q_BIT_STRING	\
626
	"\020"			\
627
	"\020"			\
Lines 648-654 enum ahci_err_type { Link Here
648
	"\026MRVL_SR_DEL"	\
649
	"\026MRVL_SR_DEL"	\
649
	"\027NOCCS"		\
650
	"\027NOCCS"		\
650
	"\030NOAUX"		\
651
	"\030NOAUX"		\
651
	"\031IOMMU_BUSWIDE"
652
	"\031IOMMU_BUSWIDE"	\
653
	"\032SLOWDEV"
652
654
653
int ahci_attach(device_t dev);
655
int ahci_attach(device_t dev);
654
int ahci_detach(device_t dev);
656
int ahci_detach(device_t dev);
(-)sys/dev/ahci/ahci_pci.c (-1 / +1 lines)
Lines 293-299 static const struct { Link Here
293
	{0x92201b4b, 0x00, "Marvell 88SE9220",  AHCI_Q_ALTSIG |
293
	{0x92201b4b, 0x00, "Marvell 88SE9220",  AHCI_Q_ALTSIG |
294
	    AHCI_Q_IOMMU_BUSWIDE},
294
	    AHCI_Q_IOMMU_BUSWIDE},
295
	{0x92301b4b, 0x00, "Marvell 88SE9230",  AHCI_Q_ALTSIG |
295
	{0x92301b4b, 0x00, "Marvell 88SE9230",  AHCI_Q_ALTSIG |
296
	    AHCI_Q_IOMMU_BUSWIDE},
296
	    AHCI_Q_IOMMU_BUSWIDE | AHCI_Q_SLOWDEV},
297
	{0x92351b4b, 0x00, "Marvell 88SE9235",  0},
297
	{0x92351b4b, 0x00, "Marvell 88SE9235",  0},
298
	{0x06201103, 0x00, "HighPoint RocketRAID 620",	0},
298
	{0x06201103, 0x00, "HighPoint RocketRAID 620",	0},
299
	{0x06201b4b, 0x00, "HighPoint RocketRAID 620",	0},
299
	{0x06201b4b, 0x00, "HighPoint RocketRAID 620",	0},

Return to bug 243401