version 1.262, 2011/04/26 07:41:18 |
version 1.262.8.1, 2012/03/12 04:11:56 |
Line 256 scsibusdetach(device_t self, int flags) |
|
Line 256 scsibusdetach(device_t self, int flags) |
|
struct scsipi_xfer *xs; |
struct scsipi_xfer *xs; |
int error; |
int error; |
|
|
|
/* XXXSMP scsipi */ |
|
KERNEL_LOCK(1, curlwp); |
|
|
/* |
/* |
* Detach all of the periphs. |
* Detach all of the periphs. |
*/ |
*/ |
if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) |
if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) { |
|
/* XXXSMP scsipi */ |
|
KERNEL_UNLOCK_ONE(curlwp); |
|
|
return error; |
return error; |
|
} |
|
|
pmf_device_deregister(self); |
pmf_device_deregister(self); |
|
|
Line 290 scsibusdetach(device_t self, int flags) |
|
Line 297 scsibusdetach(device_t self, int flags) |
|
* Now shut down the channel. |
* Now shut down the channel. |
*/ |
*/ |
scsipi_channel_shutdown(chan); |
scsipi_channel_shutdown(chan); |
|
|
|
/* XXXSMP scsipi */ |
|
KERNEL_UNLOCK_ONE(curlwp); |
|
|
return 0; |
return 0; |
} |
} |
|
|
Line 378 scsidevdetached(device_t self, device_t |
|
Line 389 scsidevdetached(device_t self, device_t |
|
target = device_locator(child, SCSIBUSCF_TARGET); |
target = device_locator(child, SCSIBUSCF_TARGET); |
lun = device_locator(child, SCSIBUSCF_LUN); |
lun = device_locator(child, SCSIBUSCF_LUN); |
|
|
|
/* XXXSMP scsipi */ |
|
KERNEL_LOCK(1, curlwp); |
|
|
periph = scsipi_lookup_periph(chan, target, lun); |
periph = scsipi_lookup_periph(chan, target, lun); |
KASSERT(periph->periph_dev == child); |
KASSERT(periph->periph_dev == child); |
|
|
scsipi_remove_periph(chan, periph); |
scsipi_remove_periph(chan, periph); |
free(periph, M_DEVBUF); |
free(periph, M_DEVBUF); |
|
|
|
/* XXXSMP scsipi */ |
|
KERNEL_UNLOCK_ONE(curlwp); |
} |
} |
|
|
/* |
/* |