Commit f4f8a039 authored by Linus Torvalds's avatar Linus Torvalds

Manual merge of minor syntax clash

parents dc0a81a9 4f70b416
......@@ -95,10 +95,10 @@ HandSpring Visor, Palm USB, and Cli
Kroah-Hartman at greg@kroah.com
Compaq iPAQ and HP Jornada driver
Compaq iPAQ, HP Jornada and Casio EM500 driver
This driver can be used to connect to Compaq iPAQ and HP Jornada PDAs
running Windows CE 3.0 or PocketPC 2002 using a USB cable/cradle. It
This driver can be used to connect to Compaq iPAQ, HP Jornada and Casio EM500
PDAs running Windows CE 3.0 or PocketPC 2002 using a USB cable/cradle. It
has been tested only on the Compaq H3135, but is rumoured to work on
with the H3600 and later models as well as the Jornada 548 and 568.
With minor modifications, it may work for other CE based handhelds too.
......
......@@ -1141,6 +1141,10 @@ static int sd_init_onedisk(Scsi_Disk * sdkp, int dsk_nr)
* we're only interested in the header anyway, this should
* be fine.
* -- Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
*
* As it turns out, some devices return an error for
* every MODE_SENSE request except one for page 0.
* So, we should also try that. --aeb
*/
memset((void *) &cmd[0], 0, 8);
......@@ -1161,8 +1165,9 @@ static int sd_init_onedisk(Scsi_Disk * sdkp, int dsk_nr)
the_result = SRpnt->sr_result;
if (the_result) {
printk(KERN_NOTICE "%s: test WP failed, assume "
"Write Enabled\n", nbuff);
printk("%s: test WP failed, assume Write Enabled\n",
nbuff);
/* alternatively, try page 0 */
} else {
sdkp->write_prot = ((buffer[2] & 0x80) != 0);
printk(KERN_NOTICE "%s: Write Protect is %s\n", nbuff,
......
......@@ -794,6 +794,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
{
struct usblp *usblp = 0;
int protocol;
int retval;
char name[6];
/* Malloc and start initializing usblp structure so we can use it
......@@ -808,7 +809,12 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
init_waitqueue_head(&usblp->wait);
usblp->ifnum = ifnum;
if (usb_register_dev(&usblp_driver, 1, &usblp->minor)) {
retval = usb_register_dev(&usblp_driver, 1, &usblp->minor);
if (retval) {
if (retval != -ENODEV) {
err("Not able to get a minor for this device.");
goto abort;
}
/* Look for a free usblp_table entry on our own. */
while (usblp_table[usblp->minor]) {
usblp->minor++;
......@@ -871,6 +877,9 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
usblp_check_status(usblp, 0);
#endif
/* add a table entry so the device works when advertised */
usblp_table[usblp->minor] = usblp;
/* If we have devfs, create with perms=660. */
sprintf(name, "lp%d", usblp->minor);
usblp->devfs = devfs_register(usb_devfs_handle, name,
......@@ -886,7 +895,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
usblp->current_protocol, usblp->dev->descriptor.idVendor,
usblp->dev->descriptor.idProduct);
return usblp_table[usblp->minor] = usblp;
return usblp;
abort:
if (usblp) {
......
......@@ -154,12 +154,10 @@ static int ohci_hub_control (
u16 wLength
) {
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int ports;
int ports = hcd->self.root_hub->maxchild;
u32 temp;
int retval = 0;
// if (port request)
ports = roothub_a (ohci) & RH_A_NDP;
switch (typeReq) {
case ClearHubFeature:
switch (wValue) {
......
......@@ -569,6 +569,9 @@ td_fill (struct ohci_hcd *ohci, unsigned int info,
td->hwNextTD = cpu_to_le32 (td_pt->td_dma);
td->hwPSW [0] = cpu_to_le16 ((data & 0x0FFF) | 0xE000);
/* HC might read the TD right after we link it ... */
wmb ();
/* append to queue */
td->ed->hwTailP = td->hwNextTD;
}
......@@ -641,8 +644,10 @@ static void td_submit_urb (struct urb *urb)
cnt++;
}
/* start bulk list */
if (!ohci->sleeping)
if (!ohci->sleeping) {
wmb ();
writel (OHCI_BLF, &ohci->regs->cmdstatus);
}
break;
case PIPE_INTERRUPT:
......@@ -654,6 +659,7 @@ static void td_submit_urb (struct urb *urb)
break;
case PIPE_CONTROL:
/* control requests don't use toggle state */
info = TD_CC | TD_DP_SETUP | TD_T_DATA0;
td_fill (ohci, info,
#ifdef CONFIG_PCI
......@@ -678,8 +684,10 @@ static void td_submit_urb (struct urb *urb)
: TD_CC | TD_DP_OUT | TD_T_DATA1;
td_fill (ohci, info, data, 0, urb, cnt++);
/* start control list */
if (!ohci->sleeping)
if (!ohci->sleeping) {
wmb ();
writel (OHCI_CLF, &ohci->regs->cmdstatus);
}
break;
case PIPE_ISOCHRONOUS:
......
......@@ -411,6 +411,7 @@ static void* mdc800_usb_probe (struct usb_device *dev ,unsigned int ifnum,
int i,j;
struct usb_interface_descriptor *intf_desc;
int irq_interval=0;
int retval;
dbg ("(mdc800_usb_probe) called.");
......@@ -475,7 +476,11 @@ static void* mdc800_usb_probe (struct usb_device *dev ,unsigned int ifnum,
down (&mdc800->io_lock);
usb_register_dev (&mdc800_usb_driver, 1, &mdc800->minor);
retval = usb_register_dev (&mdc800_usb_driver, 1, &mdc800->minor);
if (retval && (retval != -ENODEV)) {
err ("Not able to get a minor for this device.");
return 0;
}
mdc800->dev=dev;
mdc800->open=0;
......
......@@ -812,6 +812,7 @@ probe_scanner(struct usb_device *dev, unsigned int ifnum,
int ep_cnt;
int ix;
int scn_minor;
int retval;
char valid_device = 0;
char have_bulk_in, have_bulk_out, have_intr;
......@@ -953,7 +954,13 @@ probe_scanner(struct usb_device *dev, unsigned int ifnum,
down(&scn_mutex);
if (usb_register_dev(&scanner_driver, 1, &scn_minor)) {
retval = usb_register_dev(&scanner_driver, 1, &scn_minor);
if (retval) {
if (retval != -ENODEV) {
err ("Not able to get a minor for this device.");
up(&scn_mutex);
return NULL;
}
for (scn_minor = 0; scn_minor < SCN_MAX_MNR; scn_minor++) {
if (!p_scn_table[scn_minor])
break;
......
......@@ -606,6 +606,7 @@ int hiddev_connect(struct hid_device *hid)
{
struct hiddev *hiddev;
int minor, i;
int retval;
char devfs_name[16];
for (i = 0; i < hid->maxapplication; i++)
......@@ -615,7 +616,12 @@ int hiddev_connect(struct hid_device *hid)
if (i == hid->maxapplication)
return -1;
if (usb_register_dev (&hiddev_driver, 1, &minor)) {
retval = usb_register_dev (&hiddev_driver, 1, &minor);
if (retval) {
if (retval != -ENODEV) {
err ("Not able to get a minor for this device.");
return -1;
}
for (minor = 0; minor < HIDDEV_MINORS && hiddev_table[minor]; minor++);
if (minor == HIDDEV_MINORS) {
printk(KERN_ERR "hiddev: no more free hiddev devices\n");
......
......@@ -727,6 +727,7 @@ static void *dabusb_probe (struct usb_device *usbdev, unsigned int ifnum,
const struct usb_device_id *id)
{
int devnum;
int retval;
pdabusb_t s;
dbg("dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d",
......@@ -739,7 +740,10 @@ static void *dabusb_probe (struct usb_device *usbdev, unsigned int ifnum,
if (ifnum != _DABUSB_IF && usbdev->descriptor.idProduct == 0x9999)
return NULL;
if (usb_register_dev (&dabusb_driver, 1, &devnum)) {
retval = usb_register_dev (&dabusb_driver, 1, &devnum);
if (retval) {
if (retval != -ENODEV)
return NULL;
devnum = dabusb_find_struct ();
if (devnum == -1)
return NULL;
......
......@@ -3899,6 +3899,17 @@ static void *ibmcam_probe(struct usb_device *dev, unsigned int ifnum, const stru
return uvd;
}
static struct usb_device_id id_table[] = {
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) }, /* Model 1 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) }, /* Model 3 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800C_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800D_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
{ } /* Terminating entry */
};
/*
* ibmcam_init()
*
......@@ -3926,7 +3937,8 @@ static int __init ibmcam_init(void)
sizeof(ibmcam_t),
"ibmcam",
&cbTbl,
THIS_MODULE);
THIS_MODULE,
id_table);
}
static void __exit ibmcam_cleanup(void)
......@@ -3934,15 +3946,6 @@ static void __exit ibmcam_cleanup(void)
usbvideo_Deregister(&cams);
}
static __devinitdata struct usb_device_id id_table[] = {
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) }, /* Model 1 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) }, /* Model 3 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800C_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800D_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
module_init(ibmcam_init);
......
......@@ -767,7 +767,8 @@ static int __init konicawc_init(void)
sizeof(struct konicawc),
"konicawc",
&cbTbl,
THIS_MODULE);
THIS_MODULE,
id_table);
}
......
......@@ -659,6 +659,12 @@ static void *ultracam_probe(struct usb_device *dev, unsigned int ifnum ,const st
return uvd;
}
static struct usb_device_id id_table[] = {
{ USB_DEVICE(ULTRACAM_VENDOR_ID, ULTRACAM_PRODUCT_ID) },
{ } /* Terminating entry */
};
/*
* ultracam_init()
*
......@@ -682,7 +688,8 @@ static int __init ultracam_init(void)
sizeof(ultracam_t),
"ultracam",
&cbTbl,
THIS_MODULE);
THIS_MODULE,
id_table);
}
static void __exit ultracam_cleanup(void)
......@@ -690,16 +697,7 @@ static void __exit ultracam_cleanup(void)
usbvideo_Deregister(&cams);
}
#if defined(usb_device_id_ver)
static __devinitdata struct usb_device_id id_table[] = {
{ USB_DEVICE(ULTRACAM_VENDOR_ID, ULTRACAM_PRODUCT_ID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
#endif /* defined(usb_device_id_ver) */
MODULE_LICENSE("GPL");
module_init(ultracam_init);
......
......@@ -749,7 +749,8 @@ int usbvideo_register(
const int num_extra,
const char *driverName,
const usbvideo_cb_t *cbTbl,
struct module *md )
struct module *md,
const struct usb_device_id *id_table)
{
static const char proc[] = "usbvideo_register";
usbvideo_t *cams;
......@@ -839,6 +840,7 @@ int usbvideo_register(
cams->usbdrv.name = cams->drvName;
cams->usbdrv.probe = cams->cb.probe;
cams->usbdrv.disconnect = cams->cb.disconnect;
cams->usbdrv.id_table = id_table;
#if USES_PROC_FS
if (cams->uses_procfs) {
......@@ -1192,7 +1194,7 @@ static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma)
if (!CAMERA_IS_OPERATIONAL(uvd))
return -EFAULT;
if (size > (((2 * uvd->max_frame_size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
if (size > (((USBVIDEO_NUMFRAMES * uvd->max_frame_size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
return -EINVAL;
pos = (unsigned long) uvd->fbuf;
......@@ -1471,12 +1473,14 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCGMBUF:
{
struct video_mbuf *vm = arg;
int i;
memset(vm, 0, sizeof(*vm));
vm->size = uvd->max_frame_size * 2;
vm->frames = 2;
vm->offsets[0] = 0;
vm->offsets[1] = uvd->max_frame_size;
vm->size = uvd->max_frame_size * USBVIDEO_NUMFRAMES;
vm->frames = USBVIDEO_NUMFRAMES;
for(i = 0; i < USBVIDEO_NUMFRAMES; i++)
vm->offsets[i] = i * uvd->max_frame_size;
return 0;
}
case VIDIOCMCAPTURE:
......@@ -1518,8 +1522,8 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
}
return -EINVAL;
}
if ((vm->frame != 0) && (vm->frame != 1)) {
err("VIDIOCMCAPTURE: vm.frame=%d. !E [0,1]", vm->frame);
if ((vm->frame < 0) || (vm->frame >= USBVIDEO_NUMFRAMES)) {
err("VIDIOCMCAPTURE: vm.frame=%d. !E [0-%d]", vm->frame, USBVIDEO_NUMFRAMES-1);
return -EINVAL;
}
if (uvd->frame[vm->frame].frameState == FrameState_Grabbing) {
......@@ -1618,7 +1622,7 @@ static int usbvideo_v4l_read(struct file *file, char *buf,
static const char proc[] = "usbvideo_v4l_read";
uvd_t *uvd = file->private_data;
int noblock = file->f_flags & O_NONBLOCK;
int frmx = -1;
int frmx = -1, i;
usbvideo_frame_t *frame;
if (!CAMERA_IS_OPERATIONAL(uvd) || (buf == NULL))
......@@ -1630,14 +1634,13 @@ static int usbvideo_v4l_read(struct file *file, char *buf,
down(&uvd->lock);
/* See if a frame is completed, then use it. */
if ((uvd->frame[0].frameState == FrameState_Done) ||
(uvd->frame[0].frameState == FrameState_Done_Hold) ||
(uvd->frame[0].frameState == FrameState_Error)) {
frmx = 0;
} else if ((uvd->frame[1].frameState >= FrameState_Done) ||
(uvd->frame[1].frameState == FrameState_Done_Hold) ||
(uvd->frame[1].frameState >= FrameState_Done)) {
frmx = 1;
for(i = 0; i < USBVIDEO_NUMFRAMES; i++) {
if ((uvd->frame[i].frameState == FrameState_Done) ||
(uvd->frame[i].frameState == FrameState_Done_Hold) ||
(uvd->frame[i].frameState == FrameState_Error)) {
frmx = i;
break;
}
}
/* FIXME: If we don't start a frame here then who ever does? */
......@@ -1652,10 +1655,12 @@ static int usbvideo_v4l_read(struct file *file, char *buf,
* We will need to wait until it becomes cooked, of course.
*/
if (frmx == -1) {
if (uvd->frame[0].frameState == FrameState_Grabbing)
frmx = 0;
else if (uvd->frame[1].frameState == FrameState_Grabbing)
frmx = 1;
for(i = 0; i < USBVIDEO_NUMFRAMES; i++) {
if (uvd->frame[i].frameState == FrameState_Grabbing) {
frmx = i;
break;
}
}
}
/*
......@@ -1753,7 +1758,7 @@ static int usbvideo_v4l_read(struct file *file, char *buf,
/* Mark it as available to be used again. */
uvd->frame[frmx].frameState = FrameState_Unused;
if (usbvideo_NewFrame(uvd, frmx ? 0 : 1)) {
if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES)) {
err("%s: usbvideo_NewFrame failed.", proc);
}
}
......@@ -1990,7 +1995,7 @@ static int usbvideo_NewFrame(uvd_t *uvd, int framenum)
uvd->settingsAdjusted = 1;
}
n = (framenum - 1 + USBVIDEO_NUMFRAMES) % USBVIDEO_NUMFRAMES;
n = (framenum + 1) % USBVIDEO_NUMFRAMES;
if (uvd->frame[n].frameState == FrameState_Ready)
framenum = n;
......@@ -2022,7 +2027,8 @@ static int usbvideo_NewFrame(uvd_t *uvd, int framenum)
*/
if (!(uvd->flags & FLAGS_SEPARATE_FRAMES)) {
/* This copies previous frame into this one to mask losses */
memmove(frame->data, uvd->frame[1-framenum].data, uvd->max_frame_size);
int prev = (framenum - 1 + USBVIDEO_NUMFRAMES) % USBVIDEO_NUMFRAMES;
memmove(frame->data, uvd->frame[prev].data, uvd->max_frame_size);
} else {
if (uvd->flags & FLAGS_CLEAN_FRAMES) {
/* This provides a "clean" frame but slows things down */
......
......@@ -327,7 +327,8 @@ int usbvideo_register(
const int num_extra,
const char *driverName,
const usbvideo_cb_t *cbTable,
struct module *md);
struct module *md,
const struct usb_device_id *id_table);
uvd_t *usbvideo_AllocateDevice(usbvideo_t *cams);
int usbvideo_RegisterVideoDevice(uvd_t *uvd);
void usbvideo_Deregister(usbvideo_t **uvt);
......
......@@ -1948,7 +1948,13 @@ static void *auerswald_probe (struct usb_device *usbdev, unsigned int ifnum,
init_waitqueue_head (&cp->bufferwait);
down (&dev_table_mutex);
if (usb_register_dev (&auerswald_driver, 1, &dtindex)) {
ret = usb_register_dev (&auerswald_driver, 1, &dtindex);
if (ret) {
if (ret != -ENODEV) {
err ("Not able to get a minor for this device.");
up (&dev_table_mutex);
goto pfail;
}
/* find a free slot in the device table */
for (dtindex = 0; dtindex < AUER_MAX_DEVICES; ++dtindex) {
if (dev_table[dtindex] == NULL)
......
......@@ -290,6 +290,7 @@ brlvger_probe (struct usb_device *dev, unsigned ifnum,
{
struct brlvger_priv *priv = NULL;
int i;
int retval;
struct usb_endpoint_descriptor *endpoint;
struct usb_interface_descriptor *actifsettings;
/* protects against reentrance: once we've found a free slot
......@@ -315,7 +316,12 @@ brlvger_probe (struct usb_device *dev, unsigned ifnum,
down(&reserve_sem);
if (usb_register_dev(&brlvger_driver, 1, &i)) {
retval = usb_register_dev(&brlvger_driver, 1, &i);
if (retval) {
if (retval != -ENODEV) {
err("Not able to get a minor for this device.");
goto error;
}
for( i = 0; i < MAX_NR_BRLVGER_DEVS; i++ )
if( display_table[i] == NULL )
break;
......
......@@ -62,6 +62,8 @@
#define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
#define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
static const char driver_name [] = "pegasus";
#define PEGASUS_USE_INTR
#define PEGASUS_WRITE_EEPROM
#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \
......@@ -811,7 +813,6 @@ static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
{
pegasus_t *pegasus;
int cmd;
char tmp[128];
pegasus = net->priv;
if (get_user(cmd, (int *) uaddr))
......@@ -819,12 +820,11 @@ static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
switch (cmd) {
case ETHTOOL_GDRVINFO:{
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
strncpy(info.driver, driver_name, sizeof info.driver);
strncpy(info.version, DRIVER_VERSION,
ETHTOOL_BUSINFO_LEN);
sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
pegasus->usb->devnum);
strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
usb_make_path(pegasus->usb, info.bus_info,
sizeof info.bus_info);
if (copy_to_user(uaddr, &info, sizeof(info)))
return -EFAULT;
return 0;
......@@ -833,8 +833,7 @@ static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
struct ethtool_cmd ecmd;
short lpa, bmcr;
if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
return -EFAULT;
memset(&ecmd, 0, sizeof ecmd);
ecmd.supported = (SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
......@@ -1104,7 +1103,7 @@ static void pegasus_disconnect(struct usb_device *dev, void *ptr)
}
static struct usb_driver pegasus_driver = {
name: "pegasus",
name: driver_name,
probe: pegasus_probe,
disconnect: pegasus_disconnect,
id_table: pegasus_ids,
......
......@@ -60,9 +60,9 @@ CONFIG_USB_SERIAL_VISOR
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_USB_SERIAL_IPAQ
Say Y here if you want to connect to your Compaq iPAQ or HP Jornada
548/568 running Windows CE 3.0 or PocketPC 2002 using a USB
cradle/cable. For information on using the driver,
Say Y here if you want to connect to your Compaq iPAQ, HP Jornada
548/568 or Casio EM500 running Windows CE 3.0 or PocketPC 2002
using a USB cradle/cable. For information on using the driver,
read <file:Documentation/usb/usb-serial.txt>.
This code is also available as a module ( = code which can be
......
......@@ -16,7 +16,7 @@ dep_tristate ' USB Digi International AccelePort USB Serial Driver' CONFIG_USB_
dep_tristate ' USB Empeg empeg-car Mark I/II Driver' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL
dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
dep_tristate ' USB Compaq iPAQ / HP Jornada Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
dep_tristate ' USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
dep_tristate ' USB Keyspan PDA Single Port Serial Driver' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL
......
......@@ -25,6 +25,11 @@ static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
{ }
};
......@@ -37,6 +42,11 @@ static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
{ }
};
......@@ -44,6 +54,9 @@ static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
{ }
};
......@@ -66,6 +79,19 @@ static __devinitdata struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
{ } /* Terminating entry */
};
......
......@@ -92,6 +92,20 @@
#define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU)
#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device
// BlackBox OEM devices
#define ION_DEVICE_ID_BB_EDGEPORT_4 0x001 // Edgeport/4 RS232
#define ION_DEVICE_ID_BB_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport")
#define ION_DEVICE_ID_BB_EDGEPORT_2 0x005 // Edgeport/2 RS232
#define ION_DEVICE_ID_BB_EDGEPORT_4I 0x006 // Edgeport/4 RS422
#define ION_DEVICE_ID_BB_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485
#define ION_DEVICE_ID_BB_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel
#define ION_DEVICE_ID_BB_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel
#define ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB)
#define ION_DEVICE_ID_BB_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU)
#define ION_DEVICE_ID_BB_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector
#define ION_DEVICE_ID_BB_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector
#define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s)
#define ION_DEVICE_ID_BB_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU)
// These IDs are used by the Edgeport.exe program for uninstalling.
//
#define EDGEPORT_DEVICE_IDS {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \
......
......@@ -9,6 +9,10 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* (30/4/2002) ganesh
* Added support for the Casio EM500. Completely untested. Thanks
* to info from Nathan <wfilardo@fuse.net>
*
* (19/3/2002) ganesh
* Don't submit urbs while holding spinlocks. Not strictly necessary
* in 2.5.x.
......@@ -58,7 +62,7 @@
*/
#define DRIVER_VERSION "v0.2"
#define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
#define DRIVER_DESC "USB Compaq iPAQ, HP Jornada driver"
#define DRIVER_DESC "USB Compaq iPAQ, HP Jornada, Casio EM500 driver"
/* Function prototypes for an ipaq */
static int ipaq_open (struct usb_serial_port *port, struct file *filp);
......@@ -81,6 +85,7 @@ static __devinitdata struct usb_device_id ipaq_id_table [] = {
{ USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) },
{ USB_DEVICE(CASIO_VENDOR_ID, CASIO_EM500_ID) },
{ } /* Terminating entry */
};
......
......@@ -23,6 +23,9 @@
#define HP_JORNADA_548_ID 0x1016
#define HP_JORNADA_568_ID 0x1116
#define CASIO_VENDOR_ID 0x07cf
#define CASIO_EM500_ID 0x2002
/*
* Since we can't queue our bulk write urbs (don't know why - it just
* doesn't work), we can send down only one write urb at a time. The simplistic
......
......@@ -142,6 +142,7 @@ static struct usb_serial_device_type pl2303_device = {
struct pl2303_private {
u8 line_control;
u8 termios_initialized;
};
......@@ -214,13 +215,19 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
int baud;
int i;
dbg (__FUNCTION__ " - port %d", port->number);
dbg (__FUNCTION__ " - port %d, initialized = %d", port->number,
((struct pl2303_private *) port->private)->termios_initialized);
if ((!port->tty) || (!port->tty->termios)) {
dbg(__FUNCTION__" - no tty structures");
return;
}
if (!(((struct pl2303_private *) port->private)->termios_initialized)) {
*(port->tty->termios) = tty_std_termios;
port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
((struct pl2303_private *) port->private)->termios_initialized = 1;
}
cflag = port->tty->termios->c_cflag;
/* check that they really want us to change something */
if (old_termios) {
......@@ -390,9 +397,6 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
/* Setup termios */
if (port->tty) {
*(port->tty->termios) = tty_std_termios;
port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
pl2303_set_termios (port, &tmp_termios);
}
......
......@@ -28,11 +28,15 @@ CONFIG_USB_STORAGE_FREECOM
Support for the Freecom USB to IDE/ATAPI adaptor.
Freecom has a web page at <http://www.freecom.de/>.
CONFIG_USB_STORAGE_DATAFAB
Support for certain Datafab CompactFlash readers.
Datafab has a web page at <http://www.datafabusa.com/>.
CONFIG_USB_STORAGE_DPCM
Say Y here to support the Microtech ZiO! CompactFlash/SmartMedia
reader, details at <http://www.microtechint.com/zio/index.html>.
This driver treats the flash card as a removable storage device.
Say Y here to support the Microtech ZiO! CompactFlash reader.
There is a web page at <http://www.microtechint.com/zio/index.html>.
CONFIG_USB_STORAGE_SDDR09
Say Y here to include additional code to support the Sandisk SDDR-09
SmartMedia reader in the USB Mass Storage driver.
Also works for the Microtech Zio! SmartMedia reader.
......@@ -6,7 +6,7 @@ if [ "$CONFIG_SCSI" = "n" ]; then
fi
dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
dep_mbool ' Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Datafab Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE
dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
......
......@@ -327,6 +327,7 @@ void usb_stor_show_sense(
case 0x3502: what="enclosure services unavailable"; break;
case 0x3503: what="enclosure services transfer failure"; break;
case 0x3504: what="enclosure services transfer refused"; break;
case 0x3A00: what="medium not present"; break;
case 0x3B0F: what="end of medium reached"; break;
case 0x3F02: what="changed operating definition"; break;
case 0x4100: what="data path failure (should use 40 NN)"; break;
......
......@@ -37,8 +37,13 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/config.h>
#include "usb.h"
/* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target
* mode */
int usb_stor_euscsi_init(struct us_data *us);
#ifdef CONFIG_USB_STORAGE_SDDR09
int sddr09_init(struct us_data *us);
#endif
......@@ -192,7 +192,7 @@ static int jumpshot_raw_bulk(int direction,
return US_BULK_TRANSFER_SHORT;
}
US_DEBUGP("jumpshot_raw_bulk: Transfered %d of %d bytes\n", act_len, len);
US_DEBUGP("jumpshot_raw_bulk: Transferred %d of %d bytes\n", act_len, len);
return US_BULK_TRANSFER_GOOD;
}
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
*
* Current development and maintenance by:
* (c) 2000 Robert Baruch (autophile@dol.net)
* (c) 2002 Andries Brouwer (aeb@cwi.nl)
*
* See sddr09.c for more explanation
*
......@@ -39,6 +40,9 @@ struct sddr09_card_info {
int blockmask; /* 2^blockshift - 1 */
int *lba_to_pba; /* logical to physical map */
int *pba_to_lba; /* physical to logical map */
int lbact; /* number of available pages */
int flags;
#define SDDR09_WP 1 /* write protected */
};
#endif
......@@ -130,14 +130,14 @@ UNUSUAL_DEV( 0x04e6, 0x0003, 0x0000, 0x9999,
"ImageMate SDDR09",
US_SC_SCSI, US_PR_EUSB_SDDR09, NULL,
US_FL_SINGLE_LUN | US_FL_START_STOP ),
#endif
/* This entry is from Andries.Brouwer@cwi.nl */
UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208,
"SCM Microsystems",
"eUSB SmartMedia / CompactFlash Adapter",
US_SC_SCSI, US_PR_DPCM_USB, NULL,
US_SC_SCSI, US_PR_DPCM_USB, sddr09_init,
US_FL_START_STOP),
#endif
UNUSUAL_DEV( 0x04e6, 0x0006, 0x0100, 0x0205,
"Shuttle",
......
......@@ -525,6 +525,7 @@ static void * skel_probe(struct usb_device *udev, unsigned int ifnum, const stru
int minor;
int buffer_size;
int i;
int retval;
char name[10];
......@@ -535,14 +536,20 @@ static void * skel_probe(struct usb_device *udev, unsigned int ifnum, const stru
}
down (&minor_table_mutex);
if (usb_register_dev (&skel_driver, 1, &minor)) {
retval = usb_register_dev (&skel_driver, 1, &minor);
if (retval) {
if (retval != -ENODEV) {
/* something prevented us from registering this driver */
err ("Not able to get a minor for this device.");
goto exit;
}
/* we could not get a dynamic minor, so lets find one of our own */
for (minor = 0; minor < MAX_DEVICES; ++minor) {
if (minor_table[minor] == NULL)
break;
}
if (minor >= MAX_DEVICES) {
info ("Too many devices plugged in, can not handle this device.");
err ("Too many devices plugged in, can not handle this device.");
goto exit;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment