Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
44a36f96
Commit
44a36f96
authored
Jul 29, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge gregkh@kernel.bkbits.net:linux/linus-2.6
into kroah.com:/home/greg/linux/BK/gregkh-2.6
parents
2671461b
4e4d8995
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
153 additions
and
101 deletions
+153
-101
drivers/usb/Makefile
drivers/usb/Makefile
+1
-0
drivers/usb/class/audio.c
drivers/usb/class/audio.c
+6
-3
drivers/usb/core/hcd.c
drivers/usb/core/hcd.c
+3
-3
drivers/usb/gadget/net2280.c
drivers/usb/gadget/net2280.c
+1
-1
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+1
-1
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-pci.c
+1
-1
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hcd.c
+1
-1
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+6
-4
drivers/usb/input/usbkbd.c
drivers/usb/input/usbkbd.c
+4
-3
drivers/usb/input/wacom.c
drivers/usb/input/wacom.c
+4
-3
drivers/usb/input/xpad.c
drivers/usb/input/xpad.c
+4
-3
drivers/usb/misc/emi26.c
drivers/usb/misc/emi26.c
+3
-4
drivers/usb/net/ax8817x.c
drivers/usb/net/ax8817x.c
+2
-2
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.c
+1
-1
drivers/usb/storage/shuttle_usbat.c
drivers/usb/storage/shuttle_usbat.c
+115
-71
No files found.
drivers/usb/Makefile
View file @
44a36f96
...
...
@@ -35,6 +35,7 @@ obj-$(CONFIG_USB_SE401) += media/
obj-$(CONFIG_USB_STV680)
+=
media/
obj-$(CONFIG_USB_VICAM)
+=
media/
obj-$(CONFIG_USB_AX8817X)
+=
net/
obj-$(CONFIG_USB_CATC)
+=
net/
obj-$(CONFIG_USB_KAWETH)
+=
net/
obj-$(CONFIG_USB_PEGASUS)
+=
net/
...
...
drivers/usb/class/audio.c
View file @
44a36f96
...
...
@@ -2953,6 +2953,8 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
if
(
alts
->
desc
.
bInterfaceClass
!=
USB_CLASS_AUDIO
||
alts
->
desc
.
bInterfaceSubClass
!=
2
)
continue
;
if
(
alts
->
desc
.
bNumEndpoints
<
1
)
{
/* altsetting 0 should never have iso EPs */
if
(
alts
->
desc
.
bAlternateSetting
!=
0
)
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u does not have an endpoint
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
...
...
@@ -3872,9 +3874,10 @@ static void usb_audio_disconnect(struct usb_interface *intf)
static
int
__init
usb_audio_init
(
void
)
{
usb_register
(
&
usb_audio_driver
);
int
result
=
usb_register
(
&
usb_audio_driver
);
if
(
result
==
0
)
info
(
DRIVER_VERSION
":"
DRIVER_DESC
);
return
0
;
return
result
;
}
...
...
drivers/usb/core/hcd.c
View file @
44a36f96
...
...
@@ -1273,7 +1273,6 @@ static int hcd_unlink_urb (struct urb *urb)
*/
static
void
hcd_endpoint_disable
(
struct
usb_device
*
udev
,
int
endpoint
)
{
unsigned
long
flags
;
struct
hcd_dev
*
dev
;
struct
usb_hcd
*
hcd
;
struct
urb
*
urb
;
...
...
@@ -1282,6 +1281,8 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
dev
=
udev
->
hcpriv
;
hcd
=
udev
->
bus
->
hcpriv
;
local_irq_disable
();
rescan:
/* (re)block new requests, as best we can */
if
(
endpoint
&
USB_DIR_IN
)
{
...
...
@@ -1293,7 +1294,6 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
}
/* then kill any current requests */
local_irq_save
(
flags
);
spin_lock
(
&
hcd_data_lock
);
list_for_each_entry
(
urb
,
&
dev
->
urb_list
,
urb_list
)
{
int
tmp
=
urb
->
pipe
;
...
...
@@ -1342,7 +1342,7 @@ static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
goto
rescan
;
}
spin_unlock
(
&
hcd_data_lock
);
local_irq_
restore
(
flags
);
local_irq_
enable
(
);
/* synchronize with the hardware, so old configuration state
* clears out immediately (and will be freed).
...
...
drivers/usb/gadget/net2280.c
View file @
44a36f96
...
...
@@ -2664,7 +2664,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
/*-------------------------------------------------------------------------*/
static
struct
pci_device_id
__devinitdata
pci_ids
[]
=
{
{
static
struct
pci_device_id
pci_ids
[]
=
{
{
.
class
=
((
PCI_CLASS_SERIAL_USB
<<
8
)
|
0xfe
),
.
class_mask
=
~
0
,
.
vendor
=
0x17cc
,
...
...
drivers/usb/host/ehci-hcd.c
View file @
44a36f96
...
...
@@ -974,7 +974,7 @@ static const struct hc_driver ehci_driver = {
/* EHCI spec says PCI is required. */
/* PCI driver selection metadata; PCI hotplugging uses this */
static
struct
pci_device_id
__devinitdata
pci_ids
[]
=
{
{
static
struct
pci_device_id
pci_ids
[]
=
{
{
/* handle any USB 2.0 EHCI controller */
...
...
drivers/usb/host/ohci-pci.c
View file @
44a36f96
...
...
@@ -351,7 +351,7 @@ static const struct hc_driver ohci_pci_hc_driver = {
/*-------------------------------------------------------------------------*/
static
const
struct
pci_device_id
__devinitdata
pci_ids
[]
=
{
{
static
const
struct
pci_device_id
pci_ids
[]
=
{
{
/* handle any USB OHCI controller */
.
class
=
(
PCI_CLASS_SERIAL_USB
<<
8
)
|
0x10
,
...
...
drivers/usb/host/uhci-hcd.c
View file @
44a36f96
...
...
@@ -2503,7 +2503,7 @@ static const struct hc_driver uhci_driver = {
.
hub_control
=
uhci_hub_control
,
};
static
const
struct
pci_device_id
__devinitdata
uhci_pci_ids
[]
=
{
{
static
const
struct
pci_device_id
uhci_pci_ids
[]
=
{
{
/* handle any USB UHCI controller */
.
class
=
((
PCI_CLASS_SERIAL_USB
<<
8
)
|
0x00
),
...
...
drivers/usb/input/aiptek.c
View file @
44a36f96
...
...
@@ -367,10 +367,12 @@ static struct usb_driver aiptek_driver = {
static
int
__init
aiptek_init
(
void
)
{
usb_register
(
&
aiptek_driver
);
int
result
=
usb_register
(
&
aiptek_driver
);
if
(
result
==
0
)
{
info
(
DRIVER_VERSION
" "
DRIVER_AUTHOR
);
info
(
DRIVER_DESC
);
return
0
;
}
return
result
;
}
static
void
__exit
...
...
drivers/usb/input/usbkbd.c
View file @
44a36f96
...
...
@@ -366,9 +366,10 @@ static struct usb_driver usb_kbd_driver = {
static
int
__init
usb_kbd_init
(
void
)
{
usb_register
(
&
usb_kbd_driver
);
int
result
=
usb_register
(
&
usb_kbd_driver
);
if
(
result
==
0
)
info
(
DRIVER_VERSION
":"
DRIVER_DESC
);
return
0
;
return
result
;
}
static
void
__exit
usb_kbd_exit
(
void
)
...
...
drivers/usb/input/wacom.c
View file @
44a36f96
...
...
@@ -629,9 +629,10 @@ static struct usb_driver wacom_driver = {
static
int
__init
wacom_init
(
void
)
{
usb_register
(
&
wacom_driver
);
int
result
=
usb_register
(
&
wacom_driver
);
if
(
result
==
0
)
info
(
DRIVER_VERSION
":"
DRIVER_DESC
);
return
0
;
return
result
;
}
static
void
__exit
wacom_exit
(
void
)
...
...
drivers/usb/input/xpad.c
View file @
44a36f96
...
...
@@ -342,9 +342,10 @@ static struct usb_driver xpad_driver = {
static
int
__init
usb_xpad_init
(
void
)
{
usb_register
(
&
xpad_driver
);
int
result
=
usb_register
(
&
xpad_driver
);
if
(
result
==
0
)
info
(
DRIVER_DESC
":"
DRIVER_VERSION
);
return
0
;
return
result
;
}
static
void
__exit
usb_xpad_exit
(
void
)
...
...
drivers/usb/misc/emi26.c
View file @
44a36f96
...
...
@@ -201,7 +201,7 @@ static int emi26_load_firmware (struct usb_device *dev)
return
err
;
}
static
__devinitdata
struct
usb_device_id
id_table
[]
=
{
static
struct
usb_device_id
id_table
[]
=
{
{
USB_DEVICE
(
EMI26_VENDOR_ID
,
EMI26_PRODUCT_ID
)
},
{
}
/* Terminating entry */
};
...
...
@@ -231,13 +231,12 @@ struct usb_driver emi26_driver = {
.
name
=
"emi26 - firmware loader"
,
.
probe
=
emi26_probe
,
.
disconnect
=
emi26_disconnect
,
.
id_table
=
NULL
,
.
id_table
=
id_table
,
};
static
int
__init
emi26_init
(
void
)
{
usb_register
(
&
emi26_driver
);
return
0
;
return
usb_register
(
&
emi26_driver
);
}
static
void
__exit
emi26_exit
(
void
)
...
...
drivers/usb/net/ax8817x.c
View file @
44a36f96
...
...
@@ -158,7 +158,7 @@ struct ax8817x_info {
};
const
struct
usb_device_id
ax8817x_id_table
[]
__devinitdata
=
{
const
struct
usb_device_id
ax8817x_id_table
[]
=
{
/* Linksys USB200M */
{
USB_DEVICE
(
0x077b
,
0x2226
),
driver_info
:
0x00130103
},
/* Hawking UF200, TRENDnet TU2-ET100 */
...
...
@@ -1239,7 +1239,7 @@ static int ax8817x_bind(struct usb_interface *intf,
usb_fill_int_urb
(
ax_info
->
int_urb
,
usb
,
usb_rcvintpipe
(
usb
,
1
),
ax_info
->
int_buf
,
8
,
ax_int_callback
,
ax_info
,
100
);
usb
->
speed
==
USB_SPEED_HIGH
?
8
:
100
);
ret
=
usb_submit_urb
(
ax_info
->
int_urb
,
GFP_ATOMIC
);
if
(
ret
<
0
)
{
...
...
drivers/usb/serial/ftdi_sio.c
View file @
44a36f96
...
...
@@ -392,7 +392,7 @@ static struct usb_device_id id_table_HE_TIRA1 [] = {
};
static
__devinitdata
struct
usb_device_id
id_table_combined
[]
=
{
static
struct
usb_device_id
id_table_combined
[]
=
{
{
USB_DEVICE
(
FTDI_VID
,
FTDI_SIO_PID
)
},
{
USB_DEVICE
(
FTDI_VID
,
FTDI_8U232AM_PID
)
},
{
USB_DEVICE
(
FTDI_VID
,
FTDI_RELAIS_PID
)
},
...
...
drivers/usb/storage/shuttle_usbat.c
View file @
44a36f96
...
...
@@ -103,10 +103,16 @@ int usbat_set_shuttle_features(struct us_data *us,
unsigned
char
subcountL
)
{
int
result
;
unsigned
char
command
[
8
]
=
{
0x40
,
0x81
,
epp_control
,
external_trigger
,
test_pattern
,
mask_byte
,
subcountL
,
subcountH
};
unsigned
char
*
command
=
us
->
iobuf
;
command
[
0
]
=
0x40
;
command
[
1
]
=
0x81
;
command
[
2
]
=
epp_control
;
command
[
3
]
=
external_trigger
;
command
[
4
]
=
test_pattern
;
command
[
5
]
=
mask_byte
;
command
[
6
]
=
subcountL
;
command
[
7
]
=
subcountH
;
result
=
usb_stor_ctrl_transfer
(
us
,
us
->
send_ctrl_pipe
,
...
...
@@ -128,14 +134,20 @@ int usbat_read_block(struct us_data *us,
int
use_sg
)
{
int
result
;
unsigned
char
command
[
8
]
=
{
0xC0
,
access
|
0x02
,
reg
,
0x00
,
0x00
,
0x00
,
LSB_of
(
len
),
MSB_of
(
len
)
};
unsigned
char
*
command
=
us
->
iobuf
;
if
(
!
len
)
return
USB_STOR_TRANSPORT_GOOD
;
command
[
0
]
=
0xC0
;
command
[
1
]
=
access
|
0x02
;
command
[
2
]
=
reg
;
command
[
3
]
=
0
;
command
[
4
]
=
0
;
command
[
5
]
=
0
;
command
[
6
]
=
LSB_of
(
len
);
command
[
7
]
=
MSB_of
(
len
);
result
=
usb_stor_ctrl_transfer
(
us
,
us
->
send_ctrl_pipe
,
0x80
,
...
...
@@ -164,7 +176,7 @@ int usbat_wait_not_busy(struct us_data *us, int minutes) {
int
i
;
int
result
;
unsigned
char
status
;
unsigned
char
*
status
=
us
->
iobuf
;
/* Synchronizing cache on a CDR could take a heck of a long time,
* but probably not more than 10 minutes or so. On the other hand,
...
...
@@ -174,18 +186,18 @@ int usbat_wait_not_busy(struct us_data *us, int minutes) {
for
(
i
=
0
;
i
<
1200
+
minutes
*
60
;
i
++
)
{
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
&
status
);
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
status
);
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
status
&
0x01
)
{
// check condition
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x10
,
&
status
);
if
(
*
status
&
0x01
)
{
// check condition
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x10
,
status
);
return
USB_STOR_TRANSPORT_FAILED
;
}
if
(
status
&
0x20
)
// device fault
if
(
*
status
&
0x20
)
// device fault
return
USB_STOR_TRANSPORT_FAILED
;
if
((
status
&
0x80
)
==
0x00
)
{
// not busy
if
((
*
status
&
0x80
)
==
0x00
)
{
// not busy
US_DEBUGP
(
"Waited not busy for %d steps
\n
"
,
i
);
return
USB_STOR_TRANSPORT_GOOD
;
}
...
...
@@ -214,14 +226,20 @@ int usbat_write_block(struct us_data *us,
int
minutes
)
{
int
result
;
unsigned
char
command
[
8
]
=
{
0x40
,
access
|
0x03
,
reg
,
0x00
,
0x00
,
0x00
,
LSB_of
(
len
),
MSB_of
(
len
)
};
unsigned
char
*
command
=
us
->
iobuf
;
if
(
!
len
)
return
USB_STOR_TRANSPORT_GOOD
;
command
[
0
]
=
0x40
;
command
[
1
]
=
access
|
0x03
;
command
[
2
]
=
reg
;
command
[
3
]
=
0
;
command
[
4
]
=
0
;
command
[
5
]
=
0
;
command
[
6
]
=
LSB_of
(
len
);
command
[
7
]
=
MSB_of
(
len
);
result
=
usb_stor_ctrl_transfer
(
us
,
us
->
send_ctrl_pipe
,
0x80
,
...
...
@@ -265,23 +283,13 @@ int usbat_rw_block_test(struct us_data *us,
// Not really sure the 0x07, 0x17, 0xfc, 0xe7 is necessary here,
// but that's what came out of the trace every single time.
unsigned
char
command
[
16
]
=
{
0x40
,
access
|
0x07
,
0x07
,
0x17
,
0xfc
,
0xe7
,
LSB_of
(
num_registers
*
2
),
MSB_of
(
num_registers
*
2
),
(
direction
==
SCSI_DATA_WRITE
?
0x40
:
0xC0
),
access
|
(
direction
==
SCSI_DATA_WRITE
?
0x05
:
0x04
),
data_reg
,
status_reg
,
timeout
,
qualifier
,
LSB_of
(
len
),
MSB_of
(
len
)
};
unsigned
char
*
command
=
us
->
iobuf
;
int
i
,
j
;
int
cmdlen
;
unsigned
char
*
data
=
us
->
iobuf
;
unsigned
char
*
status
=
us
->
iobuf
;
int
i
;
unsigned
char
data
[
num_registers
*
2
];
unsigned
char
status
;
for
(
i
=
0
;
i
<
num_registers
;
i
++
)
{
data
[
i
<<
1
]
=
registers
[
i
];
data
[
1
+
(
i
<<
1
)]
=
data_out
[
i
];
}
BUG_ON
(
num_registers
>
US_IOBUF_SIZE
/
2
);
for
(
i
=
0
;
i
<
20
;
i
++
)
{
...
...
@@ -296,20 +304,48 @@ int usbat_rw_block_test(struct us_data *us,
* that, we just return a failure.
*/
if
(
i
==
0
)
{
cmdlen
=
16
;
command
[
0
]
=
0x40
;
command
[
1
]
=
access
|
0x07
;
command
[
2
]
=
0x07
;
command
[
3
]
=
0x17
;
command
[
4
]
=
0xFC
;
command
[
5
]
=
0xE7
;
command
[
6
]
=
LSB_of
(
num_registers
*
2
);
command
[
7
]
=
MSB_of
(
num_registers
*
2
);
}
else
cmdlen
=
8
;
command
[
cmdlen
-
8
]
=
(
direction
==
SCSI_DATA_WRITE
?
0x40
:
0xC0
);
command
[
cmdlen
-
7
]
=
access
|
(
direction
==
SCSI_DATA_WRITE
?
0x05
:
0x04
);
command
[
cmdlen
-
6
]
=
data_reg
;
command
[
cmdlen
-
5
]
=
status_reg
;
command
[
cmdlen
-
4
]
=
timeout
;
command
[
cmdlen
-
3
]
=
qualifier
;
command
[
cmdlen
-
2
]
=
LSB_of
(
len
);
command
[
cmdlen
-
1
]
=
MSB_of
(
len
);
result
=
usb_stor_ctrl_transfer
(
us
,
us
->
send_ctrl_pipe
,
0x80
,
0x40
,
0
,
0
,
(
i
==
0
?
command
:
command
+
8
)
,
(
i
==
0
?
16
:
8
)
);
command
,
cmdlen
);
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
i
==
0
)
{
for
(
j
=
0
;
j
<
num_registers
;
j
++
)
{
data
[
j
<<
1
]
=
registers
[
j
];
data
[
1
+
(
j
<<
1
)]
=
data_out
[
j
];
}
result
=
usb_stor_bulk_transfer_buf
(
us
,
us
->
send_bulk_pipe
,
data
,
num_registers
*
2
,
NULL
);
...
...
@@ -366,13 +402,13 @@ int usbat_rw_block_test(struct us_data *us,
result
=
usbat_read
(
us
,
USBAT_ATA
,
direction
==
SCSI_DATA_WRITE
?
0x17
:
0x0E
,
&
status
);
status
);
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
status
&
0x01
)
// check condition
if
(
*
status
&
0x01
)
// check condition
return
USB_STOR_TRANSPORT_FAILED
;
if
(
status
&
0x20
)
// device fault
if
(
*
status
&
0x20
)
// device fault
return
USB_STOR_TRANSPORT_FAILED
;
US_DEBUGP
(
"Redoing %s
\n
"
,
...
...
@@ -403,17 +439,20 @@ int usbat_multiple_write(struct us_data *us,
unsigned
short
num_registers
)
{
int
result
;
unsigned
char
data
[
num_registers
*
2
]
;
unsigned
char
*
data
=
us
->
iobuf
;
int
i
;
unsigned
char
command
[
8
]
=
{
0x40
,
access
|
0x07
,
0x00
,
0x00
,
0x00
,
0x00
,
LSB_of
(
num_registers
*
2
),
MSB_of
(
num_registers
*
2
)
};
unsigned
char
*
command
=
us
->
iobuf
;
for
(
i
=
0
;
i
<
num_registers
;
i
++
)
{
data
[
i
<<
1
]
=
registers
[
i
];
data
[
1
+
(
i
<<
1
)]
=
data_out
[
i
];
}
BUG_ON
(
num_registers
>
US_IOBUF_SIZE
/
2
);
command
[
0
]
=
0x40
;
command
[
1
]
=
access
|
0x07
;
command
[
2
]
=
0
;
command
[
3
]
=
0
;
command
[
4
]
=
0
;
command
[
5
]
=
0
;
command
[
6
]
=
LSB_of
(
num_registers
*
2
);
command
[
7
]
=
MSB_of
(
num_registers
*
2
);
result
=
usb_stor_ctrl_transfer
(
us
,
us
->
send_ctrl_pipe
,
...
...
@@ -427,6 +466,11 @@ int usbat_multiple_write(struct us_data *us,
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
for
(
i
=
0
;
i
<
num_registers
;
i
++
)
{
data
[
i
<<
1
]
=
registers
[
i
];
data
[
1
+
(
i
<<
1
)]
=
data_out
[
i
];
}
result
=
usb_stor_bulk_transfer_buf
(
us
,
us
->
send_bulk_pipe
,
data
,
num_registers
*
2
,
NULL
);
...
...
@@ -593,7 +637,7 @@ int usbat_handle_read10(struct us_data *us,
static
int
hp_8200e_select_and_test_registers
(
struct
us_data
*
us
)
{
int
selector
;
unsigned
char
status
;
unsigned
char
*
status
=
us
->
iobuf
;
// try device = master, then device = slave.
...
...
@@ -603,19 +647,19 @@ static int hp_8200e_select_and_test_registers(struct us_data *us) {
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x16
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x16
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -627,11 +671,11 @@ static int hp_8200e_select_and_test_registers(struct us_data *us) {
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
}
...
...
@@ -642,7 +686,7 @@ static int hp_8200e_select_and_test_registers(struct us_data *us) {
int
init_8200e
(
struct
us_data
*
us
)
{
int
result
;
unsigned
char
status
;
unsigned
char
*
status
=
us
->
iobuf
;
// Enable peripheral control signals
...
...
@@ -655,13 +699,13 @@ int init_8200e(struct us_data *us) {
wait_ms
(
2000
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
US_DEBUGP
(
"INIT 2
\n
"
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -699,13 +743,13 @@ int init_8200e(struct us_data *us) {
// Read ISA port 0x27
if
(
usbat_read
(
us
,
USBAT_ISA
,
0x27
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ISA
,
0x27
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
US_DEBUGP
(
"INIT 7
\n
"
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -717,7 +761,7 @@ int init_8200e(struct us_data *us) {
US_DEBUGP
(
"INIT 9
\n
"
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -732,7 +776,7 @@ int init_8200e(struct us_data *us) {
US_DEBUGP
(
"INIT 11
\n
"
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -740,7 +784,7 @@ int init_8200e(struct us_data *us) {
wait_ms
(
1400
);
if
(
usbat_read_user_io
(
us
,
&
status
)
!=
if
(
usbat_read_user_io
(
us
,
status
)
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
...
...
@@ -768,7 +812,7 @@ int init_8200e(struct us_data *us) {
int
hp8200e_transport
(
Scsi_Cmnd
*
srb
,
struct
us_data
*
us
)
{
int
result
;
unsigned
char
status
;
unsigned
char
*
status
=
us
->
iobuf
;
unsigned
char
registers
[
32
];
unsigned
char
data
[
32
];
unsigned
int
len
;
...
...
@@ -802,8 +846,8 @@ int hp8200e_transport(Scsi_Cmnd *srb, struct us_data *us)
data
[
i
]
=
(
i
-
7
>=
srb
->
cmd_len
)
?
0
:
srb
->
cmnd
[
i
-
7
];
}
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
&
status
);
US_DEBUGP
(
"Status = %02X
\n
"
,
status
);
result
=
usbat_read
(
us
,
USBAT_ATA
,
0x17
,
status
);
US_DEBUGP
(
"Status = %02X
\n
"
,
*
status
);
if
(
result
!=
USB_STOR_XFER_GOOD
)
return
USB_STOR_TRANSPORT_ERROR
;
if
(
srb
->
cmnd
[
0
]
==
TEST_UNIT_READY
)
...
...
@@ -866,21 +910,21 @@ int hp8200e_transport(Scsi_Cmnd *srb, struct us_data *us)
// How many bytes to read in? Check cylL register
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
&
status
)
!=
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x14
,
status
)
!=
USB_STOR_XFER_GOOD
)
{
return
USB_STOR_TRANSPORT_ERROR
;
}
if
(
len
>
0xFF
)
{
// need to read cylH also
len
=
status
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
&
status
)
!=
len
=
*
status
;
if
(
usbat_read
(
us
,
USBAT_ATA
,
0x15
,
status
)
!=
USB_STOR_XFER_GOOD
)
{
return
USB_STOR_TRANSPORT_ERROR
;
}
len
+=
((
unsigned
int
)
status
)
<<
8
;
len
+=
((
unsigned
int
)
*
status
)
<<
8
;
}
else
len
=
status
;
len
=
*
status
;
result
=
usbat_read_block
(
us
,
USBAT_ATA
,
0x10
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment