summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-all.c
diff options
context:
space:
mode:
authorthomas <thomas@FreeBSD.org>2002-10-22 20:18:51 +0000
committerthomas <thomas@FreeBSD.org>2002-10-22 20:18:51 +0000
commit8caec9a500d4293aea472a3e271842d2ddacfeb6 (patch)
treef50066b5dfad8f06ed5c405fc688264b8060d81c /sys/dev/ata/ata-all.c
parent2d3640fddd01b6d05253a3ebcb3159c067604907 (diff)
downloadFreeBSD-src-8caec9a500d4293aea472a3e271842d2ddacfeb6.zip
FreeBSD-src-8caec9a500d4293aea472a3e271842d2ddacfeb6.tar.gz
Fill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUS
and XPT_RESET_DEV. In order to properly handle reset requests whether they originate in the ATA layer (atacontrol reinit) or from the CAM layer (camcontrol reset) ata_reinit does not cause the SIM to be deallocated anymore. The SIM is now unconditionnally created for each ATAPI bus. This change may cause existing bus ids to change on some setups. Reviewed by: roberto Approved by: sos
Diffstat (limited to 'sys/dev/ata/ata-all.c')
-rw-r--r--sys/dev/ata/ata-all.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 7b9a20a..4bc2097 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -210,8 +210,7 @@ ata_attach(device_t dev)
atapi_attach(&ch->device[SLAVE]);
#endif
#ifdef DEV_ATAPICAM
- if (ch->devices & (ATA_ATAPI_MASTER | ATA_ATAPI_SLAVE))
- atapi_cam_attach_bus(ch);
+ atapi_cam_attach_bus(ch);
#endif
}
return 0;
@@ -244,8 +243,7 @@ ata_detach(device_t dev)
atapi_detach(&ch->device[SLAVE]);
#endif
#ifdef DEV_ATAPICAM
- if (ch->devices & (ATA_ATAPI_SLAVE|ATA_ATAPI_MASTER))
- atapi_cam_detach_bus(ch);
+ atapi_cam_detach_bus(ch);
#endif
splx(s);
@@ -585,8 +583,7 @@ ata_boot_attach(void)
atapi_attach(&ch->device[SLAVE]);
#endif
#ifdef DEV_ATAPICAM
- if (ch->devices & (ATA_ATAPI_MASTER | ATA_ATAPI_SLAVE))
- atapi_cam_attach_bus(ch);
+ atapi_cam_attach_bus(ch);
#endif
}
}
@@ -852,10 +849,6 @@ ata_reinit(struct ata_channel *ch)
ata_printf(ch, -1, "resetting devices ..\n");
ata_reset(ch);
-#ifdef DEV_ATAPICAM
- if (devices & (ATA_ATAPI_SLAVE|ATA_ATAPI_MASTER))
- atapi_cam_detach_bus(ch);
-#endif
if ((misdev = devices & ~ch->devices)) {
#ifdef DEV_ATADISK
if (misdev & ATA_ATA_MASTER && ch->device[MASTER].driver)
@@ -923,8 +916,7 @@ ata_reinit(struct ata_channel *ch)
}
#endif
#ifdef DEV_ATAPICAM
- if (ch->devices & (ATA_ATAPI_MASTER | ATA_ATAPI_SLAVE))
- atapi_cam_attach_bus(ch);
+ atapi_cam_reinit_bus(ch);
#endif
printf("done\n");
ATA_UNLOCK_CH(ch);
OpenPOWER on IntegriCloud