diff options
author | sos <sos@FreeBSD.org> | 2005-09-14 12:45:06 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2005-09-14 12:45:06 +0000 |
commit | 3075efc7afec20b9694e3ec99848940bea14ea76 (patch) | |
tree | 9c8d827516807e33e8e188f2ee6f1ddb3e711311 /sys/dev/ata/ata-lowlevel.c | |
parent | db6ae269ba7d21c49a7b2e0ad9129194394c8839 (diff) | |
download | FreeBSD-src-3075efc7afec20b9694e3ec99848940bea14ea76.zip FreeBSD-src-3075efc7afec20b9694e3ec99848940bea14ea76.tar.gz |
Harden the hotplug support for SATA devices.
This also fixes a few races that was present in the timeout/detach code.
Sponsored by: pair.com
Diffstat (limited to 'sys/dev/ata/ata-lowlevel.c')
-rw-r--r-- | sys/dev/ata/ata-lowlevel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c index 2751e87..29135b7 100644 --- a/sys/dev/ata/ata-lowlevel.c +++ b/sys/dev/ata/ata-lowlevel.c @@ -117,7 +117,8 @@ ata_begin_transaction(struct ata_request *request) /* if write command output the data */ if (write) { if (ata_wait(ch, atadev, (ATA_S_READY | ATA_S_DRQ)) < 0) { - device_printf(request->dev,"timeout waiting for write DRQ"); + device_printf(request->dev, + "timeout waiting for write DRQ\n"); request->result = EIO; goto begin_finished; } @@ -278,7 +279,8 @@ ata_end_transaction(struct ata_request *request) /* if read data get it */ if (request->flags & ATA_R_READ) { if (ata_wait(ch, atadev, (ATA_S_READY | ATA_S_DRQ)) < 0) { - device_printf(request->dev, "timeout waiting for read DRQ"); + device_printf(request->dev, + "timeout waiting for read DRQ\n"); request->result = EIO; goto end_finished; } @@ -302,7 +304,7 @@ ata_end_transaction(struct ata_request *request) /* if we get an error here we are done with the HW */ if (ata_wait(ch, atadev, (ATA_S_READY | ATA_S_DRQ)) < 0) { device_printf(request->dev, - "timeout waiting for write DRQ"); + "timeout waiting for write DRQ\n"); request->status = ATA_IDX_INB(ch, ATA_STATUS); goto end_finished; } |