On Mon, 11 Aug 2003, Robert L. Harris wrote:
Bah, it went to kern.log. Attaching that compressed. If this isn't
what you want or is too much debugging let me know. This is the whole
log file incase something is mixed in the middle.
Okay, I see the problem with 2.6. It stems from a change I made but
didn't examine carefully enough. The attached patch ought to fix things,
bringing 2.6 up to the performance level of 2.4 -- I know that's not
saying very much! But at least it's a start. If the patch works I'll
submit it, so send another kernel log.
The problem with 2.4 wasn't apparent from your log. It may be a problem
involving the SCSI layer. usb-storage succeeded in probing and
registering the drive and then didn't receive any more requests until you
rmmod'ed it 30 seconds later.
Alan Stern
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet1.1659 - 1.1660
# drivers/usb/storage/isd200.c1.41- 1.42
#
# The following is the BitKeeper ChangeSet Log
#
# 03/08/12 [EMAIL PROTECTED] 1.1660
# Don't do DMA into the middle of a structure (info-drive).
# Don't use I/O buffers for two different purposes simultaneously
# (info-ATARegs, regs, us-iobuf).
#
#
diff -Nru a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
--- a/drivers/usb/storage/isd200.c Tue Aug 12 16:11:14 2003
+++ b/drivers/usb/storage/isd200.c Tue Aug 12 16:11:14 2003
@@ -272,8 +272,9 @@
struct isd200_info {
struct inquiry_data InquiryData;
- struct hd_driveid drive;
+ struct hd_driveid *drive;
struct isd200_config ConfigData;
+ unsigned char *RegsBuf;
unsigned char ATARegs[8];
unsigned char DeviceHead;
unsigned char DeviceFlags;
@@ -473,7 +474,7 @@
ata.generic.RegisterSelect = REG_COMMAND;
ata.write.CommandByte = WIN_IDENTIFY;
srb-sc_data_direction = SCSI_DATA_READ;
- srb-request_buffer = (void *)info-drive;
+ srb-request_buffer = (void *) info-drive;
srb-request_bufflen = sizeof(struct hd_driveid);
break;
@@ -513,11 +514,12 @@
US_DEBUGP(Entering isd200_IssueATAReadRegs\n);
transferStatus = isd200_action( us, ACTION_READ_STATUS,
- info-ATARegs, sizeof(info-ATARegs) );
+ info-RegsBuf, sizeof(info-ATARegs) );
if (transferStatus != ISD200_TRANSPORT_GOOD) {
US_DEBUGP( Error reading ATA registers\n);
retStatus = ISD200_ERROR;
} else {
+ memcpy(info-ATARegs, info-RegsBuf, sizeof(info-ATARegs));
US_DEBUGP( Got ATA Register[IDE_ERROR_OFFSET] = 0x%x\n,
info-ATARegs[IDE_ERROR_OFFSET]);
}
@@ -835,9 +837,9 @@
int detect )
{
int status = ISD200_GOOD;
- unsigned char *regs = us-iobuf;
unsigned long endTime;
struct isd200_info *info = (struct isd200_info *)us-extra;
+ unsigned char *regs = info-RegsBuf;
int recheckAsMaster = FALSE;
if ( detect )
@@ -984,6 +986,7 @@
{
struct isd200_info *info = (struct isd200_info *)us-extra;
int retStatus = ISD200_GOOD;
+ struct hd_driveid *drive = info-drive;
US_DEBUGP(Entering isd200_get_inquiry_data\n);
@@ -1000,7 +1003,7 @@
/* this must be an ATA device */
/* perform an ATA Command Identify */
transferStatus = isd200_action( us, ACTION_IDENTIFY,
- info-drive,
+ drive,
sizeof(struct hd_driveid) );
if (transferStatus != ISD200_TRANSPORT_GOOD) {
/* Error issuing ATA Command Identify */
@@ -1010,35 +1013,35 @@
/* ATA Command Identify successful */
int i;
__u16 *src, *dest;
- ide_fix_driveid(info-drive);
+ ide_fix_driveid(drive);
US_DEBUGP( Identify Data Structure:\n);
- US_DEBUGP( config = 0x%x\n, info-drive.config);
- US_DEBUGP( cyls = 0x%x\n, info-drive.cyls);
- US_DEBUGP( heads = 0x%x\n, info-drive.heads);
- US_DEBUGP( track_bytes = 0x%x\n,