Re: Juju's sbp2 not making /dev/sgX entries?
Brought to you by:
aeb,
bencollins
From: m. a. n. <kit...@gm...> - 2008-01-29 02:39:19
|
thanks for the patch, but no luck. there must be something different in the commands which preceed the inquiry. i will try to translate some of the WDM capture, and see if i can understand some of it. Is there any way to get similar debugging out of the firewire stack to compare, or should i just go digging in the code? any 'firewire for dummies' links? allan On 1/27/08, Stefan Richter <st...@s5...> wrote: > Here is a primitive patch which adds a 20 seconds delay between login > and inquiry, for your testing pleasure. As with other kernel patches, > apply with "patch -p1 < ~/patchfile" when in the linux-2.6.24 directory. > --- > drivers/firewire/fw-sbp2.c | 11 +++++++++++ > drivers/ieee1394/sbp2.c | 10 ++++++++++ > 2 files changed, 21 insertions(+) > > Index: linux/drivers/firewire/fw-sbp2.c > =================================================================== > --- linux.orig/drivers/firewire/fw-sbp2.c > +++ linux/drivers/firewire/fw-sbp2.c > @@ -32,6 +32,7 @@ > #include <linux/module.h> > #include <linux/moduleparam.h> > #include <linux/mod_devicetable.h> > +#include <linux/delay.h> > #include <linux/device.h> > #include <linux/scatterlist.h> > #include <linux/dma-mapping.h> > @@ -647,6 +648,9 @@ static void sbp2_login(struct work_struc > node_id = device->node->node_id; > local_node_id = device->card->local_node->node_id; > > + /* ----------- SBP-2 login ----------- */ > + // ssleep(20); > + > if (sbp2_send_management_orb(lu, node_id, generation, > SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) { > if (lu->retries++ < 5) { > @@ -679,6 +683,9 @@ static void sbp2_login(struct work_struc > sbp2_set_busy_timeout(scsi_id); > #endif > > + /* ----------- SBP-2 fetch agent reset ----------- */ > + // ssleep(20); > + > PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect); > sbp2_agent_reset(lu); > > @@ -686,6 +693,10 @@ static void sbp2_login(struct work_struc > eight_bytes_lun.scsi_lun[0] = (lu->lun >> 8) & 0xff; > eight_bytes_lun.scsi_lun[1] = lu->lun & 0xff; > > + /* ----------- SCSI INQUIRY ----------- */ > + ssleep(20); > + fw_notify("INQUIRY ahead\n"); > + > sdev = __scsi_add_device(shost, 0, 0, > scsilun_to_int(&eight_bytes_lun), lu); > if (IS_ERR(sdev)) { > Index: linux/drivers/ieee1394/sbp2.c > =================================================================== > --- linux.orig/drivers/ieee1394/sbp2.c > +++ linux/drivers/ieee1394/sbp2.c > @@ -893,6 +893,9 @@ static int sbp2_start_device(struct sbp2 > if (sbp2util_create_command_orb_pool(lu)) > goto alloc_fail; > > + /* ----------- SBP-2 login ----------- */ > + // ssleep(20 - 1); > + > /* Wait a second before trying to log in. Previously logged in > * initiators need a chance to reconnect. */ > if (msleep_interruptible(1000)) { > @@ -905,10 +908,17 @@ static int sbp2_start_device(struct sbp2 > return -EBUSY; > } > > + /* ----------- SBP-2 fetch agent reset ----------- */ > + // ssleep(20); > + > sbp2_set_busy_timeout(lu); > sbp2_agent_reset(lu, 1); > sbp2_max_speed_and_size(lu); > > + /* ----------- SCSI INQUIRY ----------- */ > + ssleep(20); > + SBP2_INFO("INQUIRY ahead"); > + > error = scsi_add_device(lu->shost, 0, lu->ud->id, 0); > if (error) { > SBP2_ERR("scsi_add_device failed"); > > -- > Stefan Richter > -=====-==--- ---= ==-== > http://arcgraph.de/sr/ > > -- "The truth is an offense, but not a sin" |