* scsi_transport_sas and device hotplug
@ 2006-05-19 13:29 Scott O'Connor
2006-05-19 15:49 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Scott O'Connor @ 2006-05-19 13:29 UTC (permalink / raw)
To: linux-scsi
Hello,
I have a question about this transport layer and SAS Hot plugging.
With a LSI1068 (SAS) card, I'm trying to do device hotplug.
Back in the day I used the /proc calls below to hotplug a device.
scsi remove-single-device <args>
scsi add_single-device <args>
With 2.6.16-1 kernel, the "remove" call below works, the /dev/sd*
structure is removed.
echo scsi remove-single-device 0 07 00 00 > /proc/scsi/scsi
However, this does not add the device back (the /dev/sd* node
is not created):
echo scsi add-single-device 0 07 00 00 > /proc/scsi/scsi
I see the scsi_proc.c to scsi_transport_sas.c user_scan transport
layer code and it seems hooked up properly. Before I debug, has
anyone else seen a problem here?
Thanks for any help,
-Scott.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: scsi_transport_sas and device hotplug
2006-05-19 13:29 scsi_transport_sas and device hotplug Scott O'Connor
@ 2006-05-19 15:49 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2006-05-19 15:49 UTC (permalink / raw)
To: Scott O'Connor; +Cc: linux-scsi
On Fri, 2006-05-19 at 09:29 -0400, Scott O'Connor wrote:
> With a LSI1068 (SAS) card, I'm trying to do device hotplug.
> Back in the day I used the /proc calls below to hotplug a device.
>
> scsi remove-single-device <args>
> scsi add_single-device <args>
>
> With 2.6.16-1 kernel, the "remove" call below works, the /dev/sd*
> structure is removed.
>
> echo scsi remove-single-device 0 07 00 00 > /proc/scsi/scsi
>
> However, this does not add the device back (the /dev/sd* node
> is not created):
>
> echo scsi add-single-device 0 07 00 00 > /proc/scsi/scsi
>
> I see the scsi_proc.c to scsi_transport_sas.c user_scan transport
> layer code and it seems hooked up properly. Before I debug, has
> anyone else seen a problem here?
Actually, when I try this with 2.6.17-rc4, I get a BUG triggered in the
transport class at line 579 ... it's finding the wrong device in the
user_scan callback.
Does this attached patch fix it for you?
James
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Hos
list_for_each_entry(rphy, &sas_host->rphy_list, list) {
struct sas_phy *parent = dev_to_phy(rphy->dev.parent);
- if (rphy->scsi_target_id == -1)
+ if (rphy->identify.device_type != SAS_END_DEVICE ||
+ rphy->scsi_target_id == -1)
continue;
if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) &&
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-19 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-19 13:29 scsi_transport_sas and device hotplug Scott O'Connor
2006-05-19 15:49 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox