On Mon, 27 Mar 2000, Aaron C wrote:
> Mr. Dharm:
First of all, call me Matt. The only people who call me Mr. Dharm are my
lawyers and my yes-men. :)
> Well, I finally got to test the usb-uhci driver (I had stopped trying to
> use it at 2.3.48 because it wasn't working at all for me). I got
> basically the same results.
'basically'? Please elaborate.
> Still no /proc/scsi/scsi entry. Am I fighting a lost cause here?
According to the latest logs you send, it's far from a lost cause. It's
probably just a driver bug. Try the attached patch. This patch is
against 2.3.99-pre3 (downloaded today). It happens to incorporate Pavel's
patch to usb-storage, so if you've applied that allready, you're going to
get conflicts. Either (a) reverse Pavel's patch, or (b) get a clean copy
of usb-storage.c from 2.3.99-pre3.
IMPORTANT NOTE: This patch is not for general consumption. Should this
fix your problem, I will be incorporating it into a bigger patch which
both (a) cleans up the transport interface, and (b) fixes this problem.
This patch should _not_ be sent to Linus for inclusion at it stands.
By the way... I like the format of your reports. Especially the part
where you include the identifying information for the device in every
e-mail you send. I wish more people would do this.
Matt Dharm
--
Matthew Dharm Home: [EMAIL PROTECTED]
Engineer, Qualcomm, Inc. Work: [EMAIL PROTECTED]
You should try to see the techs say "three piece suit".
-- The Chief
User Friendly, 11/23/1997
diff -ur -X exclusions linux-2.3.99-pre3/drivers/usb/usb-storage.c
linux-2.3.99-pre3mdd/drivers/usb/usb-storage.c
--- linux-2.3.99-pre3/drivers/usb/usb-storage.c Thu Mar 23 15:15:18 2000
+++ linux-2.3.99-pre3mdd/drivers/usb/usb-storage.c Mon Mar 27 19:30:46 2000
@@ -351,6 +351,7 @@
/* send the command to the transport layer */
result = us->transport(srb, us);
+ US_DEBUGP("return code from transport is 0x%x\n", result);
/* If we got a short transfer, but it was for a command that
* can have short transfers, we're actually okay
@@ -362,6 +363,7 @@
(us->srb->cmnd[0] == LOG_SENSE) ||
(us->srb->cmnd[0] == MODE_SENSE_10))) {
us->srb->result = DID_OK;
+ result = USB_STOR_TRANSPORT_GOOD;
}
/*
@@ -821,7 +823,7 @@
/* transfer the data payload for this command, if one exists*/
if (us_transfer_length(srb)) {
us_transfer(srb, US_DIRECTION(srb->cmnd[0]));
- US_DEBUGP("CBI data stage result is 0x%x\n", result);
+ US_DEBUGP("CBI data stage result is 0x%x\n", srb->result);
}
/* STATUS STAGE */
@@ -876,7 +878,7 @@
int result;
__u8 status[2];
- US_DEBUGP("CBC gets a command:\n");
+ US_DEBUGP("CB gets a command:\n");
US_DEBUG(us_show_command(srb));
/* COMMAND STAGE */
@@ -908,7 +910,7 @@
/* transfer the data payload for this command, if one exists*/
if (us_transfer_length(srb)) {
us_transfer(srb, US_DIRECTION(srb->cmnd[0]));
- US_DEBUGP("CBC data stage result is 0x%x\n", result);
+ US_DEBUGP("CB data stage result is 0x%x\n", srb->result);
}
@@ -1174,6 +1176,7 @@
/* FIXME: This doesn't actually abort anything */
static int us_abort( Scsi_Cmnd *srb )
{
+ printk(KERN_CRIT "usb-storage: abort() requested but not implemented\n" );
return 0;
}
@@ -1182,6 +1185,7 @@
{
struct us_data *us = (struct us_data *)srb->host->hostdata[0];
+ printk(KERN_CRIT "usb-storage: bus_reset() requested but not implemented\n" );
US_DEBUGP("Bus reset requested\n");
if (us->ip_wanted)
up(&(us->ip_waitq));
@@ -1192,6 +1196,7 @@
/* FIXME: This doesn't actually reset anything */
static int us_host_reset( Scsi_Cmnd *srb )
{
+ printk(KERN_CRIT "usb-storage: host_reset() requested but not implemented\n"
+);
return 0;
}
@@ -1298,36 +1303,27 @@
*/
static Scsi_Host_Template my_host_template = {
- NULL, /* next */
- NULL, /* module */
- NULL, /* proc_dir */
- usb_stor_proc_info,
- NULL, /* name - points to unique */
- us_detect,
- us_release,
- NULL, /* info */
- NULL, /* ioctl */
- us_command,
- us_queuecommand,
- NULL, /* eh_strategy */
- us_abort,
- us_bus_reset,
- us_bus_reset,
- us_host_reset,
- NULL, /* abort */
- NULL, /* reset */
- NULL, /* slave_attach */
- NULL, /* bios_param */
- NULL, /* select_queue_depths */
- 1, /* can_queue */
- -1, /* this_id */
- SG_ALL, /* sg_tablesize */
- 1, /* cmd_per_lun */
- 0, /* present */
- FALSE, /* unchecked_isa_dma */
- TRUE, /* use_clustering */
- TRUE, /* use_new_eh_code */
- TRUE /* emulated */
+ proc_info: usb_stor_proc_info,
+ detect: us_detect,
+ release: us_release,
+ command: us_command,
+ queuecommand: us_queuecommand,
+
+ eh_abort_handler: us_abort,
+ eh_device_reset_handler:us_bus_reset,
+ eh_bus_reset_handler: us_bus_reset,
+ eh_host_reset_handler: us_host_reset,
+
+ can_queue: 1,
+ this_id: -1,
+
+ sg_tablesize: SG_ALL,
+ cmd_per_lun: 1,
+ present: 0,
+ unchecked_isa_dma: FALSE,
+ use_clustering: TRUE,
+ use_new_eh_code: TRUE,
+ emulated: TRUE,
};
static unsigned char sense_notready[] = {
@@ -1795,7 +1791,7 @@
down(&(ss->notify));
/* now register - our detect function will be called */
- ss->htmplt.module = &__this_module;
+ ss->htmplt.module = THIS_MODULE;
scsi_register_module(MODULE_SCSI_HA, &(ss->htmplt));
/* put us in the list */
@@ -1849,19 +1845,6 @@
int __init usb_stor_init(void)
{
- /*
- * Check to see if the host template is a different size from
- * what we're expected -- people have updated this in the past
- * and forgotten about this driver.
- */
- if (sizeof(my_host_template) != SCSI_HOST_TEMPLATE_SIZE) {
- printk(KERN_ERR "usb-storage: SCSI_HOST_TEMPLATE_SIZE bad\n");
- printk(KERN_ERR
- "usb-storage: expected %d bytes, got %d bytes\n",
- SCSI_HOST_TEMPLATE_SIZE, sizeof(my_host_template)) ;
- return -1 ;
- }
-
/* register the driver, return -1 if error */
if (usb_register(&storage_driver) < 0)
return -1;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]