Commit 6423f883 authored by Linus Torvalds's avatar Linus Torvalds

- Stephen Rothwell: APM updates

- Johannes Erdfelt: USB updates
- Linus: call_usermodehelper(/sbin/hotplug) cleanup and deadlock fix
- Leonard Zubkoff: DAC960 Driver Update
- Martin Diehl: fix PCI PM callback ordering
- Andrew Morton: call_usermodehelper() fixes
- Urban Widmark: clean up and enable shared mmap on smbfs.
- Trond Myklebust: fix NFS path revalidation.
parent 52c2264c
......@@ -10392,6 +10392,16 @@ CONFIG_USB_SERIAL_EMPEG
The module will be called empeg.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
USB MCT Single Port Serial Driver
CONFIG_USB_SERIAL_MCT_U232
Say Y here if you want to use a USB Serial single port adapter from
Magic Control Technology Corp. (U232 is one of the model numbers).
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called mct_u232.o. If you want to compile it as
a module, say M here and read Documentation/modules.txt.
USB Serial Converter verbose debug
CONFIG_USB_SERIAL_DEBUG
Say Y here if you want verbose debug messages from the USB Serial
......
Linux Driver for Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers
Version 2.2.8 for Linux 2.2.16
Version 2.4.8 for Linux 2.4.0
Version 2.2.9 for Linux 2.2.17
Version 2.4.9 for Linux 2.4.0
PRODUCTION RELEASE
19 August 2000
7 September 2000
Leonard N. Zubkoff
Dandelion Digital
......@@ -203,13 +203,13 @@ ftp://ftp.mylex.com/pub/dac960/diskcomp.html.
DRIVER INSTALLATION
This distribution was prepared for Linux kernel version 2.2.16 or 2.4.0.
This distribution was prepared for Linux kernel version 2.2.17 or 2.4.0.
To install the DAC960 RAID driver, you may use the following commands,
replacing "/usr/src" with wherever you keep your Linux kernel source tree:
cd /usr/src
tar -xvzf DAC960-2.2.8.tar.gz (or DAC960-2.4.8.tar.gz)
tar -xvzf DAC960-2.2.9.tar.gz (or DAC960-2.4.9.tar.gz)
mv README.DAC960 linux/Documentation
mv DAC960.[ch] linux/drivers/block
patch -p0 < DAC960.patch (if DAC960.patch is included)
......
......@@ -26,9 +26,9 @@ USB-specific:
-ENODEV specified USB-device or bus doesn't exist
USB_ST_REQUEST_ERROR
-ENXIO a) specified endpoint doesn't exist on the device
b) an URB is already queued to this endpoint and
USB_QUEUE_BULK wasn't used (UHCI HCDs only)
-ENXIO a control or interrupt URB is already queued to this endpoint; or
a bulk URB is already queued to this endpoint and
USB_QUEUE_BULK wasn't used (UHCI HCDs only)
USB_ST_URB_INVALID_ERROR
-EINVAL a) Invalid transfer type specified (or not supported)
......
......@@ -200,6 +200,18 @@ Empeg empeg-car Mark I/II Driver (empeg.c)
helpful. :)
MCT USB Single Port Serial Adapter U232
This driver is for the MCT USB-RS232 Converter (25 pin, Model No.
U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
Model No. U232-P9). More information about this device can be found
at the manufacture's web-site: http://www.mct.com.tw.
The driver is generally working, though it still needs some more
testing. It is derived from the Belkin USB Serial Adapter F5U103
driver and its TODO list is valid for this driver as well.
Generic Serial driver
If your device is not one of the above listed devices, compatible with
......
This diff is collapsed.
......@@ -68,7 +68,7 @@ EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(get_cmos_time);
EXPORT_SYMBOL(apm_bios_info);
EXPORT_SYMBOL(apm_info);
EXPORT_SYMBOL(gdt);
EXPORT_SYMBOL_NOVERS(__down_failed);
......
......@@ -126,7 +126,7 @@ unsigned int mca_pentium_flag;
*/
struct drive_info_struct { char dummy[32]; } drive_info;
struct screen_info screen_info;
struct apm_bios_info apm_bios_info;
struct apm_info apm_info;
struct sys_desc_table_struct {
unsigned short length;
unsigned char table[0];
......@@ -608,7 +608,7 @@ void __init setup_arch(char **cmdline_p)
ROOT_DEV = to_kdev_t(ORIG_ROOT_DEV);
drive_info = DRIVE_INFO;
screen_info = SCREEN_INFO;
apm_bios_info = APM_BIOS_INFO;
apm_info.bios = APM_BIOS_INFO;
if( SYS_DESC_TABLE.length != 0 ) {
MCA_bus = SYS_DESC_TABLE.table[3] &0x2;
machine_id = SYS_DESC_TABLE.table[0];
......
......@@ -33,6 +33,7 @@ endif
# machines may also. Since BFD is incredibly buggy with respect to
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
CFLAGS += -I $(TOPDIR)/include/asm $(CFLAGS)
CFLAGS += -mabi=64 -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe
LINKFLAGS += -G 0 -static # -N
MODFLAGS += -mlong-calls
......@@ -154,7 +155,7 @@ archclean:
@$(MAKEBOOT) clean
$(MAKE) -C arch/$(ARCH)/kernel clean
$(MAKE) -C arch/$(ARCH)/tools clean
rm -f vmlinux.64 arch/($ARCH)/ld.script.elf32
rm -f vmlinux.64 arch/$(ARCH)/ld.script.elf32
archmrproper:
@$(MAKEBOOT) mrproper
......
......@@ -336,9 +336,7 @@ acpi_thread(void *context)
interruptible_sleep_on(&acpi_thread_wait);
if (signal_pending(current))
break;
do {
run_task_queue(&acpi_thread_run);
} while (acpi_thread_run);
run_task_queue(&acpi_thread_run);
}
/*
......
......@@ -19,8 +19,8 @@
*/
#define DAC960_DriverVersion "2.4.8"
#define DAC960_DriverDate "19 August 2000"
#define DAC960_DriverVersion "2.4.9"
#define DAC960_DriverDate "7 September 2000"
#include <linux/version.h>
......@@ -300,13 +300,8 @@ static inline void DAC960_DeallocateCommand(DAC960_Command_T *Command)
static void DAC960_WaitForCommand(DAC960_Controller_T *Controller)
{
DECLARE_WAITQUEUE(WaitQueueEntry, current);
add_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
current->state = TASK_UNINTERRUPTIBLE;
spin_unlock(&io_request_lock);
schedule();
current->state = TASK_RUNNING;
remove_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
spin_unlock_irq(&io_request_lock);
__wait_event(Controller->CommandWaitQueue, Controller->FreeCommands);
spin_lock_irq(&io_request_lock);
}
......@@ -4957,7 +4952,8 @@ static int DAC960_IOCTL(Inode_T *Inode, File_T *File,
}
Geometry.start =
Controller->GenericDiskInfo.part[MINOR(Inode->i_rdev)].start_sect;
return copy_to_user(UserGeometry, &Geometry, sizeof(DiskGeometry_T));
return (copy_to_user(UserGeometry, &Geometry,
sizeof(DiskGeometry_T)) ? -EFAULT : 0);
case BLKGETSIZE:
/* Get Device Size. */
if ((long *) Argument == NULL) return -EINVAL;
......@@ -5078,8 +5074,8 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
ControllerInfo.PCI_Address = Controller->PCI_Address;
strcpy(ControllerInfo.ModelName, Controller->ModelName);
strcpy(ControllerInfo.FirmwareVersion, Controller->FirmwareVersion);
return copy_to_user(UserSpaceControllerInfo, &ControllerInfo,
sizeof(DAC960_ControllerInfo_T));
return (copy_to_user(UserSpaceControllerInfo, &ControllerInfo,
sizeof(DAC960_ControllerInfo_T)) ? -EFAULT : 0);
}
case DAC960_IOCTL_V1_EXECUTE_COMMAND:
{
......@@ -6401,7 +6397,7 @@ static int DAC960_ProcWriteUserCommand(File_T *File, const char *Buffer,
unsigned char CommandBuffer[80];
int Length;
if (Count > sizeof(CommandBuffer)-1) return -EINVAL;
copy_from_user(CommandBuffer, Buffer, Count);
if (copy_from_user(CommandBuffer, Buffer, Count)) return -EFAULT;
CommandBuffer[Count] = '\0';
Length = strlen(CommandBuffer);
if (CommandBuffer[Length-1] == '\n')
......
......@@ -885,6 +885,36 @@ void generic_make_request (int rw, struct buffer_head * bh)
while (q->make_request_fn(q, rw, bh));
}
/*
* Submit a buffer head for IO.
*/
void submit_bh(int rw, struct buffer_head * bh)
{
if (!test_bit(BH_Lock, &bh->b_state))
BUG();
set_bit(BH_Req, &bh->b_state);
/*
* First step, 'identity mapping' - RAID or LVM might
* further remap this.
*/
bh->b_rdev = bh->b_dev;
bh->b_rsector = bh->b_blocknr * (bh->b_size>>9);
generic_make_request(rw, bh);
}
/*
* Default IO end handler, used by "ll_rw_block()".
*/
static void end_buffer_io_sync(struct buffer_head *bh, int uptodate)
{
mark_buffer_uptodate(bh, uptodate);
unlock_buffer(bh);
}
/* This function can be used to request a number of buffers from a block
device. Currently the only restriction is that all buffers must belong to
the same device */
......@@ -931,7 +961,8 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[])
if (test_and_set_bit(BH_Lock, &bh->b_state))
continue;
set_bit(BH_Req, &bh->b_state);
/* We have the buffer lock */
bh->b_end_io = end_buffer_io_sync;
switch(rw) {
case WRITE:
......@@ -954,17 +985,9 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[])
end_io:
bh->b_end_io(bh, test_bit(BH_Uptodate, &bh->b_state));
continue;
}
/*
* First step, 'identity mapping' - RAID or LVM might
* further remap this.
*/
bh->b_rdev = bh->b_dev;
bh->b_rsector = bh->b_blocknr * (bh->b_size>>9);
generic_make_request(rw, bh);
submit_bh(rw, bh);
}
return;
......@@ -973,7 +996,6 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[])
buffer_IO_error(bhs[i]);
}
#ifdef CONFIG_STRAM_SWAP
extern int stram_device_init (void);
#endif
......
......@@ -1262,7 +1262,7 @@ static void release_dev(struct file * filp)
* Make sure that the tty's task queue isn't activated.
*/
run_task_queue(&tq_timer);
run_schedule_tasks();
flush_scheduled_tasks();
/*
* The release_mem function takes care of the details of clearing
......
......@@ -300,18 +300,25 @@ static int
pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
{
const struct pci_device_id *id;
int ret = 0;
if (drv->id_table) {
id = pci_match_device(drv->id_table, dev);
if (!id)
return 0;
if (!id) {
ret = 0;
goto out;
}
} else
id = NULL;
dev_probe_lock();
if (drv->probe(dev, id) >= 0) {
dev->driver = drv;
return 1;
ret = 1;
}
return 0;
dev_probe_unlock();
out:
return ret;
}
int
......@@ -360,9 +367,9 @@ run_sbin_hotplug(struct pci_dev *pdev, int insert)
if (!hotplug_path[0])
return;
sprintf(class_id, "PCI_CLASS=%X", pdev->class);
sprintf(id, "PCI_ID=%X/%X", pdev->vendor, pdev->device);
sprintf(sub_id, "PCI_SUBSYS_ID=%X/%X", pdev->subsystem_vendor, pdev->subsystem_device);
sprintf(class_id, "PCI_CLASS=%04X", pdev->class);
sprintf(id, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device);
sprintf(sub_id, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, pdev->subsystem_device);
sprintf(bus_id, "PCI_SLOT_NAME=%s", pdev->slot_name);
i = 0;
......@@ -704,6 +711,7 @@ static struct pci_bus * __init pci_alloc_bus(void)
static struct pci_bus * __init pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr)
{
struct pci_bus *child;
int i;
/*
* Allocate a new bus, and inherit stuff from the parent..
......@@ -725,6 +733,10 @@ static struct pci_bus * __init pci_add_new_bus(struct pci_bus *parent, struct pc
child->primary = parent->secondary;
child->subordinate = 0xff;
/* Set up default resource pointers.. */
for (i = 0; i < 4; i++)
child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
return child;
}
......@@ -765,10 +777,7 @@ static int __init pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int
unsigned int cmax = pci_do_scan_bus(child);
if (cmax > max) max = cmax;
} else {
int i;
unsigned int cmax = child->subordinate;
for (i = 0; i < 4; i++)
child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
if (cmax > max) max = cmax;
}
} else {
......@@ -782,6 +791,7 @@ static int __init pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int
pci_read_config_word(dev, PCI_COMMAND, &cr);
pci_write_config_word(dev, PCI_COMMAND, 0x0000);
pci_write_config_word(dev, PCI_STATUS, 0xffff);
child = pci_add_new_bus(bus, dev, ++max);
buses = (buses & 0xff000000)
| ((unsigned int)(child->primary) << 0)
......@@ -795,15 +805,12 @@ static int __init pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int
/* Now we can scan all subordinate buses... */
max = pci_do_scan_bus(child);
} else {
int i;
/*
* For CardBus bridges, we leave 4 bus numbers
* as cards with a PCI-to-PCI bridge can be
* inserted later.
*/
max += 3;
for (i = 0; i < 4; i++)
child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
}
/*
* Set the subordinate bus number to its real value.
......@@ -1082,6 +1089,9 @@ static int pci_pm_resume_device(struct pci_dev *dev)
return 0;
}
/* take care to suspend/resume bridges only once */
static int pci_pm_suspend_bus(struct pci_bus *bus)
{
struct list_head *list;
......@@ -1093,9 +1103,6 @@ static int pci_pm_suspend_bus(struct pci_bus *bus)
/* Walk the device children list */
list_for_each(list, &bus->devices)
pci_pm_suspend_device(pci_dev_b(list));
/* Suspend the bus controller.. */
pci_pm_suspend_device(bus->self);
return 0;
}
......@@ -1103,8 +1110,6 @@ static int pci_pm_resume_bus(struct pci_bus *bus)
{
struct list_head *list;
pci_pm_resume_device(bus->self);
/* Walk the device children list */
list_for_each(list, &bus->devices)
pci_pm_resume_device(pci_dev_b(list));
......@@ -1118,18 +1123,26 @@ static int pci_pm_resume_bus(struct pci_bus *bus)
static int pci_pm_suspend(void)
{
struct list_head *list;
struct pci_bus *bus;
list_for_each(list, &pci_root_buses)
pci_pm_suspend_bus(pci_bus_b(list));
list_for_each(list, &pci_root_buses) {
bus = pci_bus_b(list);
pci_pm_suspend_bus(bus);
pci_pm_suspend_device(bus->self);
}
return 0;
}
static int pci_pm_resume(void)
{
struct list_head *list;
struct pci_bus *bus;
list_for_each(list, &pci_root_buses)
pci_pm_resume_bus(pci_bus_b(list));
list_for_each(list, &pci_root_buses) {
bus = pci_bus_b(list);
pci_pm_resume_device(bus->self);
pci_pm_resume_bus(bus);
}
return 0;
}
......
......@@ -134,7 +134,7 @@ static struct mixer_defaults {
{SOUND_MIXER_PCM, 0x4343},
{SOUND_MIXER_SPEAKER, 0x4343},
{SOUND_MIXER_LINE, 0x4343},
{SOUND_MIXER_MIC, 0x4343},
{SOUND_MIXER_MIC, 0x0000},
{SOUND_MIXER_CD, 0x4343},
{SOUND_MIXER_ALTPCM, 0x4343},
{SOUND_MIXER_IGAIN, 0x4343},
......
......@@ -258,7 +258,7 @@ struct cs4281_state {
#define SNDCTL_DSP_CS_GETDBGMASK _SIOWR('P', 52, int)
#define SNDCTL_DSP_CS_SETDBGMASK _SIOWR('P', 53, int)
void printioctl(unsigned int x)
static void printioctl(unsigned int x)
{
unsigned int i;
unsigned char vidx;
......
......@@ -359,7 +359,7 @@ extern __inline__ unsigned ld2(unsigned int x)
#define SNDCTL_DSP_CS_GETDBGMASK _SIOWR('P', 52, int)
#define SNDCTL_DSP_CS_SETDBGMASK _SIOWR('P', 53, int)
void printioctl(unsigned int x)
static void printioctl(unsigned int x)
{
unsigned int i;
unsigned char vidx;
......
......@@ -95,8 +95,8 @@ struct usb_hub {
struct urb *urb; /* Interrupt polling pipe */
char buffer[USB_MAXCHILDREN / 8];
char buffer[(USB_MAXCHILDREN + 1 + 7) / 8]; /* add 1 bit for hub status change */
/* and add 7 bits to round up to byte boundary */
int error;
int nerrors;
......
......@@ -252,6 +252,7 @@ static struct usb_device_id scanner_device_ids [] = {
{ idVendor: 0x04a5, idProduct: 0x2022 },/* Vuego Scan Brisa 340U */
/* Agfa */
{ idVendor: 0x06bd, idProduct: 0x0001 }, /* SnapScan 1212U */
{ idVendor: 0x06bd, idProduct: 0x0002 }, /* SnapScan 1236U */
{ idVendor: 0x06bd, idProduct: 0x2061 }, /* Another SnapScan 1212U (?)*/
{ idVendor: 0x06bd, idProduct: 0x0100 }, /* SnapScan Touch */
/* Colorado -- See Primax/Colorado below */
......@@ -300,10 +301,10 @@ static struct usb_device_id scanner_device_ids [] = {
{ idVendor: 0x04b8, idProduct: 0x0101 },/* Perfection 636U and 636Photo */
{ idVendor: 0x04b8, idProduct: 0x0103 },/* Perfection 610 */
{ idVendor: 0x04b8, idProduct: 0x0104 },/* Perfection 1200U and 1200Photo*/
{ idVendor: 0x04b8, idProduct: 0x0106 },/* Stylus Scan 2500 */
{ idVendor: 0x04b8, idProduct: 0x0107 },/* Expression 1600 */
/* Umax */
{ idVendor: 0x1606, idProduct: 0x0010 }, /* Astra 1220U */
{ idVendor: 0x1606, idProduct: 0x0002 }, /* Astra 1236U */
{ idVendor: 0x1606, idProduct: 0x0030 }, /* Astra 2000U */
{ idVendor: 0x1606, idProduct: 0x0230 }, /* Astra 2200U */
/* Visioneer */
......
......@@ -23,6 +23,7 @@ if [ "$CONFIG_USB_SERIAL" != "n" ]; then
bool ' USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X
bool ' USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W
fi
dep_tristate ' USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
fi
......
......@@ -23,6 +23,7 @@ obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o
obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o
obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o
obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
# Objects that export symbols.
export-objs := usbserial.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -92,16 +92,8 @@
#ifndef __USA26MSG__
#define __USA26MSG__
#ifndef __stubs__
#include "datadefs.h"
#endif
typedef struct txAckMessage
{
u8 dummy;
} txAckMessage;
typedef struct portControlMessage
typedef struct keyspan_usa26_portControlMessage
{
/*
there are three types of "commands" sent in the control message:
......@@ -172,7 +164,7 @@ typedef struct portControlMessage
returnStatus, // BOTH: return current status (even if it hasn't changed)
resetDataToggle;// BOTH: reset data toggle state to DATA0
} portControlMessage;
} keyspan_usa26_portControlMessage;
// defines for bits in lcr
#define USA_DATABITS_5 0x00
......@@ -190,7 +182,7 @@ typedef struct portControlMessage
// all things called "StatusMessage" are sent on the status endpoint
typedef struct portStatusMessage // one for each port
typedef struct keyspan_usa26_portStatusMessage // one for each port
{
u8 port, // BOTH: 0=first, 1=second, other=see below
hskia_cts, // USA26: reports HSKIA pin
......@@ -203,7 +195,7 @@ typedef struct portStatusMessage // one for each port
_txXoff, // port is in XOFF state (either host or RX XOFF)
rxEnabled, // as configured by rxOn/rxOff 1=on, 0=off
controlResponse;// 1=a control message has been processed
} portStatusMessage;
} keyspan_usa26_portStatusMessage;
// bits in RX data message when STAT byte is included
#define RXERROR_OVERRUN 0x02
......@@ -211,28 +203,28 @@ typedef struct portStatusMessage // one for each port
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
typedef struct globalControlMessage
typedef struct keyspan_usa26_globalControlMessage
{
u8 sendGlobalStatus, // 2=request for two status responses
resetStatusToggle, // 1=reset global status toggle
resetStatusCount; // a cycling value
} globalControlMessage;
} keyspan_usa26_globalControlMessage;
typedef struct globalStatusMessage
typedef struct keyspan_usa26_globalStatusMessage
{
u8 port, // 3
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} globalStatusMessage;
} keyspan_usa26_globalStatusMessage;
typedef struct globalDebugMessage
typedef struct keyspan_usa26_globalDebugMessage
{
u8 port, // 2
a,
b,
c,
d;
} globalDebugMessage;
} keyspan_usa26_globalDebugMessage;
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
......
......@@ -94,16 +94,8 @@
#ifndef __USA28MSG__
#define __USA28MSG__
/*#ifndef STUBS
#include "datadefs.h"
#endif*/
typedef struct txAckMessage
{
u8 dummy;
} txAckMessage;
typedef struct portControlMessage
typedef struct keyspan_usa28_portControlMessage
{
/*
there are four types of "commands" sent in the control message:
......@@ -153,9 +145,9 @@ typedef struct portControlMessage
returnStatus, // return current status n times (1 or 2)
resetDataToggle;// reset data toggle state to DATA0
} portControlMessage;
} keyspan_usa28_portControlMessage;
typedef struct portStatusMessage
typedef struct keyspan_usa28_portStatusMessage
{
u8 port, // 0=first, 1=second, 2=global (see below)
cts,
......@@ -171,32 +163,32 @@ typedef struct portStatusMessage
rxBreak, // 1=we're in break state
rs232invalid, // 1=no valid signals on rs-232 inputs
controlResponse;// 1=a control messages has been processed
} portStatusMessage;
} keyspan_usa28_portStatusMessage;
// bit defines in txState
#define TX_OFF 0x01 // requested by host txOff command
#define TX_XOFF 0x02 // either real, or simulated by host
typedef struct globalControlMessage
typedef struct keyspan_usa28_globalControlMessage
{
u8 sendGlobalStatus, // 2=request for two status responses
resetStatusToggle, // 1=reset global status toggle
resetStatusCount; // a cycling value
} globalControlMessage;
} keyspan_usa28_globalControlMessage;
typedef struct globalStatusMessage
typedef struct keyspan_usa28_globalStatusMessage
{
u8 port, // 3
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} globalStatusMessage;
} keyspan_usa28_globalStatusMessage;
typedef struct globalDebugMessage
typedef struct keyspan_usa28_globalDebugMessage
{
u8 port, // 2
n, // typically a count/status byte
b; // typically a data byte
} globalDebugMessage;
} keyspan_usa28_globalDebugMessage;
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
......
/*
usa49msg.h
Copyright (c) 1998-2000 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
Keyspan USB Async Firmware to run on Anchor EZ-USB
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain this licence text
without modification, this list of conditions, and the following
disclaimer. The following copyright notice must appear immediately at
the beginning of all source files:
Copyright (c) 1998-2000 InnoSys Incorporated. All Rights Reserved
This file is available under a BSD-style copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of InnoSys Incorprated may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
4th revision: USA49W version
See usa26msg.h for description of message formats
Third revision: USA28X version (aka USA26)
Buffer formats for RX/TX data messages are not defined by
a structure, but are described here:
USB OUT (host -> USA26, transmit) messages contain a
REQUEST_ACK indicator (set to 0xff to request an ACK at the
completion of transmit; 0x00 otherwise), followed by data:
RQSTACK DAT DAT DAT ...
with a total data length of 63.
USB IN (USA26 -> host, receive) messages contain either a zero
flag (indicating no error in any data bytes):
00 DAT DAT DAT ...
for a total of 63 data bytes, or a non-zero status flag (indicating
that all data bytes will be preceded by status flag):
STAT DAT STAT DAT STAT DAT ...
for a total of 32 data bytes. The valid bits in the STAT bytes are:
OVERRUN 0x02
PARITY 0x04
FRAMING 0x08
BREAK 0x10
Notes:
1. a "no status" RX data message (first byte zero) can serve as
a "break off" indicator.
2. a control message specifying disablePort will be answered
with a status message, but no further status will be sent
until a control messages with enablePort is sent
revision history:
1999feb10 add reportHskiaChanges to allow us to ignore them
1999feb10 add txAckThreshold for fast+loose throughput enhancement
1999mar30 beef up support for RX error reporting
1999apr14 add resetDataToggle to control message
2000jan04 merge with usa17msg.h
2000mar08 clone from usa26msg.h -> usa49msg.h
2000mar09 change to support 4 ports
2000may03 change external clocking to match USA-49W hardware
2000jun01 add extended BSD-style copyright text
*/
#ifndef __USA49MSG__
#define __USA49MSG__
/*
Host->device messages sent on the global control endpoint:
portNumber message
---------- --------------------
0,1,2,3 portControlMessage
0x80 globalControlMessage
*/
typedef struct keyspan_usa49_portControlMessage
{
/*
0. 0/1/2/3 port control message follows
0x80 set non-port control message follows
*/
u8 portNumber,
/*
there are three types of "commands" sent in the control message:
1. configuration changes which must be requested by setting
the corresponding "set" flag (and should only be requested
when necessary, to reduce overhead on the USA26):
*/
setClocking, // host requests baud rate be set
baudLo, // host does baud divisor calculation
baudHi, // baudHi is only used for first port (gives lower rates)
prescaler, // specified as N/8; values 8-ff are valid
// must be set any time internal baud rate is set;
txClocking, // 0=internal, 1=external/DSR
rxClocking, // 0=internal, 1=external/DSR
setLcr, // host requests lcr be set
lcr, // use PARITY, STOPBITS, DATABITS below
setFlowControl, // host requests flow control be set
ctsFlowControl, // 1=use CTS flow control, 0=don't
xonFlowControl, // 1=use XON/XOFF flow control, 0=don't
xonChar, // specified in current character format
xoffChar, // specified in current character format
setRts, // host requests RTS output be set
rts, // 1=active, 0=inactive
setDtr, // host requests DTR output be set
dtr; // 1=on, 0=off
/*
3. configuration data which is simply used as is (no overhead,
but must be specified correctly in every host message).
*/
u8 forwardingLength, // forward when this number of chars available
dsrFlowControl, // 1=use DSR flow control, 0=don't
txAckThreshold, // 0=not allowed, 1=normal, 2-255 deliver ACK faster
loopbackMode; // 0=no loopback, 1=loopback enabled
/*
4. commands which are flags only; these are processed in order
(so that, e.g., if both _txOn and _txOff flags are set, the
port ends in a TX_OFF state); any non-zero value is respected
*/
u8 _txOn, // enable transmitting (and continue if there's data)
_txOff, // stop transmitting
txFlush, // toss outbound data
txBreak, // turn on break (cleared by _txOn)
rxOn, // turn on receiver
rxOff, // turn off receiver
rxFlush, // toss inbound data
rxForward, // forward all inbound data, NOW (as if fwdLen==1)
returnStatus, // return current status (even if it hasn't changed)
resetDataToggle,// reset data toggle state to DATA0
enablePort, // start servicing port (move data, check status)
disablePort; // stop servicing port (does implicit tx/rx flush/off)
} keyspan_usa49_portControlMessage;
// defines for bits in lcr
#define USA_DATABITS_5 0x00
#define USA_DATABITS_6 0x01
#define USA_DATABITS_7 0x02
#define USA_DATABITS_8 0x03
#define STOPBITS_5678_1 0x00 // 1 stop bit for all byte sizes
#define STOPBITS_5_1p5 0x04 // 1.5 stop bits for 5-bit byte
#define STOPBITS_678_2 0x04 // 2 stop bits for 6/7/8-bit byte
#define USA_PARITY_NONE 0x00
#define USA_PARITY_ODD 0x08
#define USA_PARITY_EVEN 0x18
#define PARITY_1 0x28
#define PARITY_0 0x38
typedef struct keyspan_usa49_globalControlMessage
{
u8 portNumber, // 0x80
sendGlobalStatus, // 1/2=number of status responses requested
resetStatusToggle, // 1=reset global status toggle
resetStatusCount, // a cycling value
remoteWakeupEnable; // 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P3
} keyspan_usa49_globalControlMessage;
/*
Device->host messages send on the global status endpoint
portNumber message
---------- --------------------
0x00,0x01,0x02,0x03 portStatusMessage
0x80 globalStatusMessage
0x81 globalDebugMessage
*/
typedef struct keyspan_usa49_portStatusMessage // one for each port
{
u8 portNumber, // 0,1,2,3
cts, // reports CTS pin
dcd, // reports DCD pin
dsr, // reports DSR pin
ri, // reports RI pin
_txOff, // transmit has been disabled (by host)
_txXoff, // transmit is in XOFF state (either host or RX XOFF)
rxEnabled, // as configured by rxOn/rxOff 1=on, 0=off
controlResponse,// 1=a control message has been processed
txAck, // ACK (data TX complete)
rs232valid; // RS-232 signal valid
} keyspan_usa49_portStatusMessage;
// bits in RX data message when STAT byte is included
#define RXERROR_OVERRUN 0x02
#define RXERROR_PARITY 0x04
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
typedef struct keyspan_usa49_globalStatusMessage
{
u8 portNumber, // 0x80=globalStatusMessage
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} keyspan_usa49_globalStatusMessage;
typedef struct keyspan_usa49_globalDebugMessage
{
u8 portNumber, // 0x81=globalDebugMessage
n, // typically a count/status byte
b; // typically a data byte
} keyspan_usa49_globalDebugMessage;
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
// update status approx. 60 times a second (16.6666 ms)
#define STATUS_UPDATE_INTERVAL 16
// status rationing tuning value (each port gets checked each n ms)
#define STATUS_RATION 10
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1755,11 +1755,11 @@ static void rh_int_timer_do(unsigned long ptr)
urbp = (struct urb_priv *)u->hcpriv;
if (urbp) {
/* Check if the FSBR timed out */
if (urbp->fsbr && time_after(urbp->inserttime + IDLE_TIMEOUT, jiffies))
if (urbp->fsbr && time_after_eq(jiffies, urbp->inserttime + IDLE_TIMEOUT))
uhci_fsbr_timeout(uhci, u);
/* Check if the URB timed out */
if (u->timeout && time_after(u->timeout, jiffies)) {
if (u->timeout && time_after_eq(jiffies, u->timeout)) {
u->transfer_flags |= USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED;
uhci_unlink_urb(u);
}
......
......@@ -2626,14 +2626,14 @@ _static int process_urb (uhci_t *s, struct list_head *p)
// Completion
if (urb->complete) {
urb->dev = NULL;
spin_unlock(&s->urb_list_lock);
urb->complete ((struct urb *) urb);
// Re-submit the URB if ring-linked
if (is_ring && (urb->status != -ENOENT) && !contains_killed) {
urb->dev=usb_dev;
spin_unlock(&s->urb_list_lock);
uhci_submit_urb (urb);
spin_lock(&s->urb_list_lock);
}
spin_lock(&s->urb_list_lock);
}
usb_dec_dev_use (usb_dev);
......
......@@ -2053,9 +2053,9 @@ int usb_new_device(struct usb_device *dev)
if (err < 0) {
err("unable to get device %d configuration (error=%d)",
dev->devnum, err);
usb_destroy_configuration(dev);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
dev->devnum = -1;
usb_free_dev(dev);
return 1;
}
......
This diff is collapsed.
......@@ -127,7 +127,7 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head
if (!ahead || secno + ahead >= s->s_hpfs_fs_size)
*bhp = bh = bread(dev, secno, 512);
else *bhp = bh = breada(dev, secno, 512, 0, (ahead + 1) << 9);
else *bhp = bh = bread(dev, secno, 512);
if (bh != NULL)
return bh->b_data;
else {
......@@ -175,7 +175,7 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
if (!ahead || secno + 4 + ahead > s->s_hpfs_fs_size)
qbh->bh[0] = bh = bread(dev, secno, 512);
else qbh->bh[0] = bh = breada(dev, secno, 512, 0, (ahead + 4) << 9);
else qbh->bh[0] = bh = bread(dev, secno, 512);
if (!bh)
goto bail0;
memcpy(data, bh->b_data, 512);
......
......@@ -533,13 +533,12 @@ static int nfs_lookup_revalidate(struct dentry * dentry, int flags)
NFS_FILEID(inode) != fattr.fileid)
goto out_bad;
/* Filehandle matches? */
if (memcmp(NFS_FH(inode), fhandle.data, sizeof(struct nfs_fh)))
goto out_bad;
/* Ok, remember that we successfully checked it.. */
nfs_refresh_inode(inode, &fattr);
if (nfs_inode_is_stale(inode, &fhandle, &fattr))
goto out_bad;
out_valid_renew:
nfs_renew_times(dentry);
out_valid:
......
This diff is collapsed.
......@@ -124,7 +124,7 @@ smb_readdir(struct file *filp, void *dirent, filldir_t filldir)
qname.len = entry->len;
entry->ino = find_inode_number(dentry, &qname);
if (!entry->ino)
entry->ino = smb_invent_inos(1);
entry->ino = iunique(dentry->d_sb, 2);
}
if (filldir(dirent, entry->name, entry->len,
......@@ -325,7 +325,7 @@ smb_lookup(struct inode *dir, struct dentry *dentry)
goto add_entry;
if (!error) {
error = -EACCES;
finfo.f_ino = smb_invent_inos(1);
finfo.f_ino = iunique(dentry->d_sb, 2);
inode = smb_iget(dir->i_sb, &finfo);
if (inode) {
add_entry:
......@@ -362,7 +362,7 @@ smb_instantiate(struct dentry *dentry, __u16 fileid, int have_id)
goto out_close;
smb_renew_times(dentry);
fattr.f_ino = smb_invent_inos(1);
fattr.f_ino = iunique(dentry->d_sb, 2);
inode = smb_iget(dentry->d_sb, &fattr);
if (!inode)
goto out_no_inode;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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