diff options
Diffstat (limited to 'drivers')
43 files changed, 296 insertions, 120 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 13c818bce78f..46e69b2b9636 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -3434,8 +3434,8 @@ set_line_char(struct cyclades_port * info) } #ifdef CY_DEBUG_DTR printk("cyc:set_line_char dropping DTR\n"); - printk(" status: 0x%x, - 0x%x\n", cy_readb(base_addr+(CyMSVR1<<index)), + printk(" status: 0x%x, 0x%x\n", + cy_readb(base_addr+(CyMSVR1<<index)), cy_readb(base_addr+(CyMSVR2<<index))); #endif }else{ diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index 5e5e95adf182..801c57259644 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c @@ -462,8 +462,8 @@ PKT *PacketP; rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", PacketP->len,PacketP->len ); rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", PacketP->control, PacketP->control); rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", PacketP->csum, PacketP->csum ); - rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, - Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command ); + rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, " + "Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command ); return TRUE; } diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 979457616c0b..5c3b4b600761 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -1330,7 +1330,7 @@ static char *rp_tty_name(struct tty_struct *tty, char *buf) { if (tty) sprintf(buf, "%s%d", tty->driver.name, - MINOR(tty->device) - tty->driver.minor_start + + minor(tty->device) - tty->driver.minor_start + tty->driver.name_base); else strcpy(buf, "NULL tty"); @@ -1794,6 +1794,10 @@ int __init register_PCI(int i, unsigned int bus, unsigned int device_fn) str = "8-port Modem"; max_num_aiops = 1; break; + case 0x8: + str = "mysterious 8 port"; + max_num_aiops = 1; + break; default: str = "(unknown/unsupported)"; max_num_aiops = 0; @@ -1872,6 +1876,10 @@ static int __init init_PCI(int boards_found) PCI_DEVICE_ID_RP8M, i, &bus, &device_fn)) if(register_PCI(count+boards_found, bus, device_fn)) count++; + if(!pcibios_find_device(PCI_VENDOR_ID_RP, + 0x8, i, &bus, &device_fn)) + if(register_PCI(count+boards_found, bus, device_fn)) + count++; } return(count); } @@ -2072,6 +2080,7 @@ int __init rp_init(void) if (retval < 0) { printk("Couldn't install Rocketport callout driver " "(error %d)\n", -retval); + release_region(controller, 4); return -1; } @@ -2079,6 +2088,7 @@ int __init rp_init(void) if (retval < 0) { printk("Couldn't install tty Rocketport driver " "(error %d)\n", -retval); + release_region(controller, 4); return -1; } #ifdef ROCKET_DEBUG_OPEN diff --git a/drivers/char/sx.c b/drivers/char/sx.c index f67a1f8659c1..6698a20041b0 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -353,9 +353,11 @@ static int sx_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000, 0xc8000, 0xd8000, 0xe8000}; static int si_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000, 0xc8000, 0xd8000, 0xe8000, 0xa0000}; +static int si1_probe_addrs[]= { 0xd0000}; #define NR_SX_ADDRS (sizeof(sx_probe_addrs)/sizeof (int)) #define NR_SI_ADDRS (sizeof(si_probe_addrs)/sizeof (int)) +#define NR_SI1_ADDRS (sizeof(si1_probe_addrs)/sizeof (int)) /* Set the mask to all-ones. This alas, only supports 32 interrupts. @@ -582,6 +584,8 @@ static int sx_reset (struct sx_board *board) } } else if (IS_EISA_BOARD(board)) { outb(board->irq<<4, board->eisa_base+0xc02); + } else if (IS_SI1_BOARD(board)) { + write_sx_byte (board, SI1_ISA_RESET, 0); // value does not matter } else { /* Gory details of the SI/ISA board */ write_sx_byte (board, SI2_ISA_RESET, SI2_ISA_RESET_SET); @@ -656,6 +660,9 @@ static int sx_start_board (struct sx_board *board) } else if (IS_EISA_BOARD(board)) { write_sx_byte(board, SI2_EISA_OFF, SI2_EISA_VAL); outb((board->irq<<4)|4, board->eisa_base+0xc02); + } else if (IS_SI1_BOARD(board)) { + write_sx_byte (board, SI1_ISA_RESET_CLEAR, 0); + write_sx_byte (board, SI1_ISA_INTCL, 0); } else { /* Don't bug me about the clear_set. I haven't the foggiest idea what it's about -- REW */ @@ -681,6 +688,9 @@ static int sx_start_interrupts (struct sx_board *board) SX_CONF_HOSTIRQ); } else if (IS_EISA_BOARD(board)) { inb(board->eisa_base+0xc03); + } else if (IS_SI1_BOARD(board)) { + write_sx_byte (board, SI1_ISA_INTCL,0); + write_sx_byte (board, SI1_ISA_INTCL_CLEAR,0); } else { switch (board->irq) { case 11:write_sx_byte (board, SI2_ISA_IRQ11, SI2_ISA_IRQ11_SET);break; @@ -1690,6 +1700,7 @@ static int sx_fw_ioctl (struct inode *inode, struct file *filp, if (IS_SX_BOARD (board)) rc = SX_TYPE_SX; if (IS_CF_BOARD (board)) rc = SX_TYPE_CF; if (IS_SI_BOARD (board)) rc = SX_TYPE_SI; + if (IS_SI1_BOARD (board)) rc = SX_TYPE_SI; if (IS_EISA_BOARD (board)) rc = SX_TYPE_SI; sx_dprintk (SX_DEBUG_FIRMWARE, "returning type= %d\n", rc); break; @@ -2184,13 +2195,20 @@ static int probe_si (struct sx_board *board) int i; func_enter(); - sx_dprintk (SX_DEBUG_PROBE, "Going to verify SI signature %lx.\n", + sx_dprintk (SX_DEBUG_PROBE, "Going to verify SI signature hw %lx at %lx.\n", board->hw_base, board->base + SI2_ISA_ID_BASE); if (sx_debug & SX_DEBUG_PROBE) my_hd ((char *)(board->base + SI2_ISA_ID_BASE), 0x8); if (!IS_EISA_BOARD(board)) { + if( IS_SI1_BOARD(board) ) + { + for (i=0;i<8;i++) { + write_sx_byte (board, SI2_ISA_ID_BASE+7-i,i); + + } + } for (i=0;i<8;i++) { if ((read_sx_byte (board, SI2_ISA_ID_BASE+7-i) & 7) != i) { return 0; @@ -2579,6 +2597,21 @@ static int __init sx_init(void) my_iounmap (board->hw_base, board->base); } } + for (i=0;i<NR_SI1_ADDRS;i++) { + board = &boards[found]; + board->hw_base = si1_probe_addrs[i]; + board->base2 = + board->base = (ulong) ioremap(board->hw_base, SI1_ISA_WINDOW_LEN); + board->flags &= ~SX_BOARD_TYPE; + board->flags |= SI1_ISA_BOARD; + board->irq = sx_irqmask ?-1:0; + + if (probe_si (board)) { + found++; + } else { + my_iounmap (board->hw_base, board->base); + } + } sx_dprintk(SX_DEBUG_PROBE, "Probing for EISA cards\n"); for(eisa_slot=0x1000; eisa_slot<0x10000; eisa_slot+=0x1000) diff --git a/drivers/char/sx.h b/drivers/char/sx.h index 17e06f49f027..3191021d0a22 100644 --- a/drivers/char/sx.h +++ b/drivers/char/sx.h @@ -69,6 +69,7 @@ struct vpd_prom { #define SX_CFPCI_BOARD 0x00000008 #define SX_CFISA_BOARD 0x00000010 #define SI_EISA_BOARD 0x00000020 +#define SI1_ISA_BOARD 0x00000040 #define SX_BOARD_PRESENT 0x00001000 #define SX_BOARD_INITIALIZED 0x00002000 @@ -80,6 +81,7 @@ struct vpd_prom { SX_ISA_BOARD | SX_CFISA_BOARD)) #define IS_SI_BOARD(board) (board->flags & SI_ISA_BOARD) +#define IS_SI1_BOARD(board) (board->flags & SI1_ISA_BOARD) #define IS_EISA_BOARD(board) (board->flags & SI_EISA_BOARD) diff --git a/drivers/char/sxboards.h b/drivers/char/sxboards.h index 2f0f5428e680..427927dc7dbf 100644 --- a/drivers/char/sxboards.h +++ b/drivers/char/sxboards.h @@ -46,12 +46,36 @@ #define CARD_BUS(type) ((type>>4)&0xF) #define CARD_PHASE(type) (type&0xF) +#define TYPE_SI1_ISA CARD_TYPE(BUS_ISA,SI1_Z280) #define TYPE_SI2_ISA CARD_TYPE(BUS_ISA,SI2_Z280) #define TYPE_SI2_EISA CARD_TYPE(BUS_EISA,SI2_Z280) #define TYPE_SI2_PCI CARD_TYPE(BUS_PCI,SI2_Z280) #define TYPE_SX_ISA CARD_TYPE(BUS_ISA,SI3_T225) #define TYPE_SX_PCI CARD_TYPE(BUS_PCI,SI3_T225) +/***************************************************************************** +****************************** ****************************** +****************************** Phase 1 Z280 ****************************** +****************************** ****************************** +*****************************************************************************/ + +/* ISA board details... */ +#define SI1_ISA_WINDOW_LEN 0x10000 /* 64 Kbyte shared memory window */ +//#define SI1_ISA_MEMORY_LEN 0x8000 /* Usable memory - unused define*/ +//#define SI1_ISA_ADDR_LOW 0x0A0000 /* Lowest address = 640 Kbyte */ +//#define SI1_ISA_ADDR_HIGH 0xFF8000 /* Highest address = 16Mbyte - 32Kbyte */ +//#define SI2_ISA_ADDR_STEP SI2_ISA_WINDOW_LEN/* ISA board address step */ +//#define SI2_ISA_IRQ_MASK 0x9800 /* IRQs 15,12,11 */ + +/* ISA board, register definitions... */ +//#define SI2_ISA_ID_BASE 0x7FF8 /* READ: Board ID string */ +#define SI1_ISA_RESET 0x8000 /* WRITE: Host Reset */ +#define SI1_ISA_RESET_CLEAR 0xc000 /* WRITE: Host Reset clear*/ +#define SI1_ISA_WAIT 0x9000 /* WRITE: Host wait */ +#define SI1_ISA_WAIT_CLEAR 0xd000 /* WRITE: Host wait clear */ +#define SI1_ISA_INTCL 0xa000 /* WRITE: Host Reset */ +#define SI1_ISA_INTCL_CLEAR 0xe000 /* WRITE: Host Reset */ + /***************************************************************************** ****************************** ****************************** diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 7425fc136b7f..2d8b6e20cb04 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -875,22 +875,22 @@ static int mgsl_loopmode_send_done( struct mgsl_struct * info ); * Global linked list of SyncLink devices */ struct mgsl_struct *mgsl_device_list; -int mgsl_device_count; +static int mgsl_device_count; /* * Set this param to non-zero to load eax with the * .text section address and breakpoint on module load. * This is useful for use with gdb and add-symbol-file command. */ -int break_on_load; +static int break_on_load; /* * Driver major number, defaults to zero to get auto * assigned major number. May be forced as module parameter. */ -int ttymajor; +static int ttymajor; -int cuamajor; +static int cuamajor; /* * Array of user specified options for ISA adapters. diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c index d34380c899fb..786428c06b81 100644 --- a/drivers/char/watchdog/sbc60xxwdt.c +++ b/drivers/char/watchdog/sbc60xxwdt.c @@ -310,15 +310,16 @@ static void __exit sbc60xxwdt_unload(void) unregister_reboot_notifier(&wdt_notifier); release_region(WDT_START,1); - release_region(WDT_STOP,1); +// release_region(WDT_STOP,1); } static int __init sbc60xxwdt_init(void) { int rc = -EBUSY; - if (!request_region(WDT_STOP, 1, "SBC 60XX WDT")) - goto err_out; +// We cannot reserve 0x45 - the kernel already has! +// if (!request_region(WDT_STOP, 1, "SBC 60XX WDT")) +// goto err_out; if (!request_region(WDT_START, 1, "SBC 60XX WDT")) goto err_out_region1; diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 461f82331691..5b64c887a9e5 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -115,6 +115,9 @@ static ssize_t i2cdev_read (struct file *file, char *buf, size_t count, struct i2c_client *client = (struct i2c_client *)file->private_data; + if(count > 8192) + count = 8192; + /* copy user space data to kernel space. */ tmp = kmalloc(count,GFP_KERNEL); if (tmp==NULL) @@ -143,6 +146,9 @@ static ssize_t i2cdev_write (struct file *file, const char *buf, size_t count, struct inode *inode = file->f_dentry->d_inode; #endif /* DEBUG */ + if(count > 8192) + count = 8192; + /* copy user space data to kernel space. */ tmp = kmalloc(count,GFP_KERNEL); if (tmp==NULL) diff --git a/drivers/isdn/pcbit/capi.h b/drivers/isdn/pcbit/capi.h index a71cabad9727..18e6aa360a8f 100644 --- a/drivers/isdn/pcbit/capi.h +++ b/drivers/isdn/pcbit/capi.h @@ -63,8 +63,7 @@ extern int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb); extern int capi_decode_debug_188(u_char *hdr, ushort hdrlen); #endif -extern __inline__ -struct pcbit_chan * +static inline struct pcbit_chan * capi_channel(struct pcbit_dev *dev, struct sk_buff *skb) { ushort callref; diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4c6f207920f7..7bc47778135d 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -2605,7 +2605,7 @@ static int pmu_release(struct inode *inode, struct file *file) disable_kernel_backlight--; spin_unlock_irqrestore(&pmu_lock, flags); } -#endif defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) +#endif /* defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) */ kfree(pp); } unlock_kernel(); diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index b7982a32852f..c227a24c2b1c 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c @@ -82,24 +82,15 @@ static inline void fmi_unmute(int port) static inline int fmi_setfreq(struct fmi_device *dev) { - int myport = dev->port; + int myport = dev->port; unsigned long freq = dev->curfreq; - int i; - + down(&lock); - + outbits(16, RSF16_ENCODE(freq), myport); outbits(8, 0xC0, myport); - for(i=0; i< 100; i++) - { - udelay(1400); - cond_resched(); - } -/* If this becomes allowed use it ... current->state = TASK_UNINTERRUPTIBLE; schedule_timeout(HZ/7); -*/ - up(&lock); if (dev->curvol) fmi_unmute(myport); return 0; @@ -110,7 +101,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev) int val; int res; int myport = dev->port; - int i; + down(&lock); val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index 669521dcbc8a..fe6c48a9cd87 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c @@ -89,27 +89,27 @@ MODULE_PARM(yieldlines,"i"); MODULE_PARM(video_nr,"i"); #endif -extern __inline__ int read_lpstatus(struct qcam_device *q) +static inline int read_lpstatus(struct qcam_device *q) { return parport_read_status(q->pport); } -extern __inline__ int read_lpcontrol(struct qcam_device *q) +static inline int read_lpcontrol(struct qcam_device *q) { return parport_read_control(q->pport); } -extern __inline__ int read_lpdata(struct qcam_device *q) +static inline int read_lpdata(struct qcam_device *q) { return parport_read_data(q->pport); } -extern __inline__ void write_lpdata(struct qcam_device *q, int d) +static inline void write_lpdata(struct qcam_device *q, int d) { parport_write_data(q->pport, d); } -extern __inline__ void write_lpcontrol(struct qcam_device *q, int d) +static inline void write_lpcontrol(struct qcam_device *q, int d) { parport_write_control(q->pport, d); } @@ -506,7 +506,7 @@ void qc_set(struct qcam_device *q) the supplied buffer. It returns the number of bytes read, or -1 on error. */ -extern __inline__ int qc_readbytes(struct qcam_device *q, char buffer[]) +static inline int qc_readbytes(struct qcam_device *q, char buffer[]) { int ret=1; unsigned int hi, lo; diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index e58e445c5144..903d73fab67f 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c @@ -69,12 +69,12 @@ static int video_nr = -1; -extern __inline__ void mvv_write(u8 index, u8 value) +static inline void mvv_write(u8 index, u8 value) { outw(index|(value<<8), io_port); } -extern __inline__ u8 mvv_read(u8 index) +static inline u8 mvv_read(u8 index) { outb(index, io_port); return inb(data_port); diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index 977ac085198f..f72e30e8ca27 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c @@ -1428,6 +1428,9 @@ static int saa_ioctl(struct video_device *dev, unsigned int cmd, void *arg) if (copy_from_user(saa->dmavid2, vw.clips, VIDEO_CLIPMAP_SIZE)) return -EFAULT; + } + else if (vw.clipcount > 16384) { + return -EINVAL; } else if (vw.clipcount > 0) { if ((vcp = vmalloc(sizeof(struct video_clip) * (vw.clipcount))) == NULL) diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index c98970e20504..b7fb6f24ee5f 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c @@ -568,7 +568,7 @@ static inline int w9966_i2c_setscl(struct w9966_dev* cam, int state) if (state) { timeout = jiffies + 100; while (!w9966_i2c_getscl(cam)) { - if (jiffies > timeout) + if (time_after(jiffies, timeout)) return -1; } } diff --git a/drivers/media/video/zr36067.c b/drivers/media/video/zr36067.c index 9e27df6636d2..7c7c4aab1d92 100644 --- a/drivers/media/video/zr36067.c +++ b/drivers/media/video/zr36067.c @@ -1416,7 +1416,7 @@ static int zr36060_reset(struct zoran *zr) zr36060_sleep(zr, 0); post_office_write(zr, 3, 0, 0); udelay(2); - default: + default:; } return 0; } @@ -3758,7 +3758,7 @@ static int do_zoran_ioctl(struct zoran *zr, unsigned int cmd, * Write the overlay mask if clips are wanted. */ - if (vw.clipcount > 2048) + if (vw.clipcount < 0 || vw.clipcount > 2048) return -EINVAL; if (vw.clipcount) { vcp = diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c index a76576c42d91..3587eced11c1 100644 --- a/drivers/message/i2o/i2o_scsi.c +++ b/drivers/message/i2o/i2o_scsi.c @@ -335,15 +335,10 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru return; } -struct i2o_handler i2o_scsi_handler= -{ - i2o_scsi_reply, - NULL, - NULL, - NULL, - "I2O SCSI OSM", - 0, - I2O_CLASS_SCSI_PERIPHERAL +struct i2o_handler i2o_scsi_handler = { + .reply = i2o_scsi_reply, + .name = "I2O SCSI OSM", + .class = I2O_CLASS_SCSI_PERIPHERAL, }; /** diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index bf566d8e911d..32d190e3b58c 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c @@ -1059,26 +1059,39 @@ int __init ltpc_probe(struct net_device *dev) int autoirq; unsigned long flags; unsigned long f; + int portfound=0; SET_MODULE_OWNER(dev); save_flags(flags); /* probe for the I/O port address */ - if (io != 0x240 && !check_region(0x220,8)) { + if (io != 0x240 && request_region(0x220,8,"ltpc")) { x = inb_p(0x220+6); - if ( (x!=0xff) && (x>=0xf0) ) io = 0x220; + if ( (x!=0xff) && (x>=0xf0) ) { + io = 0x220; + portfound=1; + } + else { + release_region(0x220,8); + } } - if (io != 0x220 && !check_region(0x240,8)) { + if (io != 0x220 && request_region(0x240,8,"ltpc")) { y = inb_p(0x240+6); - if ( (y!=0xff) && (y>=0xf0) ) io = 0x240; + if ( (y!=0xff) && (y>=0xf0) ){ + io = 0x240; + portfound=1; + } + else { + release_region(0x240,8); + } } - if(io) { - /* found it, now grab it */ - request_region(io,8,"ltpc"); - } else { + if(io && !portfound && request_region(io,8,"ltpc")){ + portfound = 1; + } + if(!portfound) { /* give up in despair */ printk ("LocalTalk card not found; 220 = %02x, 240 = %02x.\n", x,y); diff --git a/drivers/net/de600.c b/drivers/net/de600.c index f0236fac3520..a626ca95cc22 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c @@ -444,7 +444,10 @@ int __init de600_probe(struct net_device *dev) return -ENODEV; } - request_region(DE600_IO, 3, "de600"); + if (!request_region(DE600_IO, 3, "de600")) { + printk(KERN_WARNING "DE600: port 0x%x busy\n", DE600_IO); + return -EBUSY; + } printk(", Ethernet Address: %02X", dev->dev_addr[0]); for (i = 1; i < ETH_ALEN; i++) diff --git a/drivers/net/fc/iph5526.c b/drivers/net/fc/iph5526.c index 59b7e5debf58..769c972de1bf 100644 --- a/drivers/net/fc/iph5526.c +++ b/drivers/net/fc/iph5526.c @@ -3791,8 +3791,10 @@ struct pci_dev *pdev = NULL; sprintf(fi->name, "fc%d", count); host = scsi_register(tmpt, sizeof(struct iph5526_hostdata)); - if(host==NULL) + if(host==NULL) { + kfree(fc[count]); return no_of_hosts; + } hostdata = (struct iph5526_hostdata *)host->hostdata; memset(hostdata, 0 , sizeof(struct iph5526_hostdata)); diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index f68c07bef92b..afbe50ffbd33 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c @@ -281,15 +281,13 @@ static int ali_ircc_open(int i, chipio_t *info) self->io.fifo_size = 16; /* SIR: 16, FIR: 32 Benjamin 2000/11/1 */ /* Reserve the ioports that we need */ - ret = check_region(self->io.fir_base, self->io.fir_ext); - if (ret < 0) { + if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) { WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, self->io.fir_base); dev_self[i] = NULL; kfree(self); return -ENODEV; } - request_region(self->io.fir_base, self->io.fir_ext, driver_name); /* Initialize QoS for this device */ irda_init_max_qos_capabilies(&self->qos); diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 937b5d086c93..e87f5aad0542 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c @@ -195,6 +195,7 @@ int __init macsonic_init(struct net_device* dev) if ((lp->rba = (char *) kmalloc(SONIC_NUM_RRS * SONIC_RBSIZE, GFP_KERNEL | GFP_DMA)) == NULL) { printk(KERN_ERR "%s: couldn't allocate receive buffers\n", dev->name); + kfree(lp); return -ENOMEM; } diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 88f3f6a63e1f..4e9452ce9f36 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c @@ -1085,6 +1085,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev, #endif return 0; err: unregister_netdev(dev); + kfree(dev->priv); kfree(dev); return -ENODEV; } @@ -1142,6 +1143,7 @@ static void __exit myri_sbus_cleanup(void) unregister_netdev(root_myri_dev->dev); kfree(root_myri_dev->dev); + kfree(root_myri_dev); root_myri_dev = next; } #endif /* MODULE */ diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 266212207d2f..860990085fce 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -644,8 +644,10 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr, release_sock(sk); return error; err_put: - dev_put(po->pppoe_dev); - po->pppoe_dev = NULL; + if (po->pppoe_dev) { + dev_put(po->pppoe_dev); + po->pppoe_dev = NULL; + } goto end; } diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 6f037c40bc7d..32a996d3f4a5 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c @@ -1209,6 +1209,7 @@ fail_and_cleanup: bp->bblock_dvma); unregister_netdev(dev); + kfree(dev->priv); kfree(dev); return -ENODEV; } diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 453aaa0f5002..0390d01340cf 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c @@ -226,16 +226,12 @@ int __init madgemc_probe(void) goto getout; } - request_region(dev->base_addr, MADGEMC_IO_EXTENT, "madgemc"); -#if 0 - /* why is this not working? */ - if (request_region(dev->base_addr, MADGEMC_IO_EXTENT, + if (!request_region(dev->base_addr, MADGEMC_IO_EXTENT, "madgemc")) { printk(KERN_INFO "madgemc: unable to setup Smart MC in slot %d because of I/O base conflict at 0x%04lx\n", slot, dev->base_addr); dev->base_addr += MADGEMC_SIF_OFFSET; goto getout; } -#endif dev->base_addr += MADGEMC_SIF_OFFSET; /* diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 6b246ca0ab95..c71d0532b6f1 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -610,7 +610,8 @@ static void sppp_channel_delete(struct channel_data *chan) static int cosa_sppp_open(struct net_device *d) { struct channel_data *chan = d->priv; - int err, flags; + int err; + unsigned long flags; if (!(chan->cosa->firmware_status & COSA_FW_START)) { printk(KERN_NOTICE "%s: start the firmware first (status %d)\n", @@ -681,7 +682,7 @@ static void cosa_sppp_timeout(struct net_device *dev) static int cosa_sppp_close(struct net_device *d) { struct channel_data *chan = d->priv; - int flags; + unsigned long flags; netif_stop_queue(d); sppp_close(d); @@ -778,7 +779,7 @@ static ssize_t cosa_read(struct file *file, char *buf, size_t count, loff_t *ppos) { DECLARE_WAITQUEUE(wait, current); - int flags; + unsigned long flags; struct channel_data *chan = (struct channel_data *)file->private_data; struct cosa_data *cosa = chan->cosa; char *kbuf; @@ -855,7 +856,7 @@ static ssize_t cosa_write(struct file *file, DECLARE_WAITQUEUE(wait, current); struct channel_data *chan = (struct channel_data *)file->private_data; struct cosa_data *cosa = chan->cosa; - unsigned int flags; + unsigned long flags; char *kbuf; if (!(cosa->firmware_status & COSA_FW_START)) { @@ -1242,7 +1243,7 @@ static void cosa_disable_rx(struct channel_data *chan) static int cosa_start_tx(struct channel_data *chan, char *buf, int len) { struct cosa_data *cosa = chan->cosa; - int flags; + unsigned long flags; #ifdef DEBUG_DATA int i; @@ -1268,7 +1269,7 @@ static int cosa_start_tx(struct channel_data *chan, char *buf, int len) static void put_driver_status(struct cosa_data *cosa) { - unsigned flags=0; + unsigned long flags; int status; spin_lock_irqsave(&cosa->lock, flags); @@ -1336,7 +1337,7 @@ static void put_driver_status_nolock(struct cosa_data *cosa) */ static void cosa_kick(struct cosa_data *cosa) { - unsigned flags, flags1; + unsigned long flags, flags1; char *s = "(probably) IRQ"; if (test_bit(RXBIT, &cosa->rxtx)) diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 5d8b29111988..82b9679e571f 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c @@ -194,7 +194,7 @@ static inline int __init sbni_isa_probe( struct net_device *dev ) { if( dev->base_addr > 0x1ff - && !check_region( dev->base_addr, SBNI_IO_EXTENT ) + && request_region( dev->base_addr, SBNI_IO_EXTENT, dev->name ) && sbni_probe1( dev, dev->base_addr, dev->irq ) ) return 0; @@ -249,7 +249,7 @@ sbni_probe( struct net_device *dev ) for( i = 0; netcard_portlist[ i ]; ++i ) { int ioaddr = netcard_portlist[ i ]; - if( !check_region( ioaddr, SBNI_IO_EXTENT ) + if( request_region( ioaddr, SBNI_IO_EXTENT, dev->name ) && sbni_probe1( dev, ioaddr, 0 )) return 0; } @@ -280,7 +280,7 @@ sbni_pci_probe( struct net_device *dev ) pci_irq_line = pdev->irq; /* Avoid already found cards from previous calls */ - if( check_region( pci_ioaddr, SBNI_IO_EXTENT ) ) { + if( !pci_request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) { pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys ); if( subsys != 2 || /* Dual adapter is present */ check_region( pci_ioaddr += 4, SBNI_IO_EXTENT ) ) @@ -310,9 +310,6 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq ) { struct net_local *nl; - if( !request_region( ioaddr, SBNI_IO_EXTENT, dev->name ) ) - return 0; - if( sbni_card_probe( ioaddr ) ) { release_region( ioaddr, SBNI_IO_EXTENT ); return 0; diff --git a/drivers/net/wan/sdla_fr.c b/drivers/net/wan/sdla_fr.c index 0f605cb65dfd..9c1611abab8e 100644 --- a/drivers/net/wan/sdla_fr.c +++ b/drivers/net/wan/sdla_fr.c @@ -162,14 +162,9 @@ #include <linux/sdla_fr.h> /* frame relay firmware API definitions */ -#if defined(LINUX_2_1) || defined(LINUX_2_4) - #include <asm/uaccess.h> - #include <linux/inetdevice.h> - #include <linux/netdevice.h> - -#else - #include <asm/segment.h> -#endif +#include <asm/uaccess.h> +#include <linux/inetdevice.h> +#include <linux/netdevice.h> #include <net/route.h> /* Dynamic Route Creation */ #include <linux/etherdevice.h> /* eth_type_trans() used for bridging */ diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 06dafe83d5fa..e950377d8cd1 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c @@ -242,6 +242,11 @@ static dev_link_t *airo_attach(void) /* Allocate space for private device-specific data */ local = kmalloc(sizeof(local_info_t), GFP_KERNEL); + if (!local) { + printk(KERN_ERR "airo_cs: no memory for new device\n"); + kfree (link); + return NULL; + } memset(local, 0, sizeof(local_info_t)); link->priv = local; diff --git a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog index 5f641fdb808c..692415edb153 100644 --- a/drivers/parport/ChangeLog +++ b/drivers/parport/ChangeLog @@ -1,8 +1,7 @@ -2001-11-14 Tim Waugh <twaugh@redhat.com> +2002-04-25 Tim Waugh <twaugh@redhat.com> - * parport_pc.c (parport_pc_pci_probe): Hooks for PCI cards before - and after probing for ports. - * parport_serial.c (parport_register): Likewise. + * parport_serial.c, parport_pc.c: Move some SIIG cards around. + Patch from Andrey Panin. 2002-01-20 Tim Waugh <twaugh@redhat.com> @@ -21,17 +20,17 @@ * daisy.c: Apply patch from Max Vorobiev to make parport_daisy_select work for ECP/EPP modes. -2002-01-04 Tim Waugh <twaugh@redhat.com> - - * share.c (parport_claim_or_block): Sleep interruptibly to prevent - a possible deadlock. - 2002-01-13 Niels Kristian Bech Jensen <nkbj@image.dk> * parport_pc.c: Change some occurrences of frob_set_mode to ECR_WRITE. This fixes PLIP. -2001-10-25 Damian Gruszka <damian.gruszka@VisionSystems.de> +2002-01-04 Tim Waugh <twaugh@redhat.com> + + * share.c (parport_claim_or_block): Sleep interruptibly to prevent + a possible deadlock. + +2001-12-07 Damian Gruszka <damian.gruszka@VisionSystems.de> * parport_pc.c (ECR_WRITE): Define. If there are forbidden bits in the ECR register for some chips, this will be a useful place to @@ -68,7 +67,7 @@ (parport_irq_probe): If no IRQ is found, take ackIntEn out of the writable bit set. -2001-10-25 Tim Waugh <twaugh@redhat.com> +2001-12-07 Tim Waugh <twaugh@redhat.com> * parport_pc.c (parport_pc_fifo_write_block_pio): Correct typo. (parport_pc_init_state): Only set ackIntEn if we know which IRQ @@ -85,6 +84,16 @@ too buggy at the moment. Use 'dma=auto' to restore the previous behaviour. +2001-12-07 Tim Waugh <twaugh@redhat.com> + + * daisy.c (DEBUG): Undefine. + +2001-12-06 Tim Waugh <twaugh@redhat.com> + + * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Mask off + PARPORT_CONTROL_AUTOFD as well. Bug spotted by Joe + <joeja@mindspring.com>. + 2001-12-03 Rich Liu <Rich.Liu@ite.com.tw> * parport_pc.c (sio_ite_8872_probe): ITE8873 is a single-port @@ -94,11 +103,11 @@ * parport_pc.c: Fix compiler warning. -2001-12-06 Tim Waugh <twaugh@redhat.com> +2001-11-14 Tim Waugh <twaugh@redhat.com> - * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Mask off - PARPORT_CONTROL_AUTOFD as well. Bug spotted by Joe - <joeja@mindspring.com>. + * parport_pc.c (parport_pc_pci_probe): Hooks for PCI cards before + and after probing for ports. + * parport_serial.c (parport_register): Likewise. 2001-11-12 Tim Waugh <twaugh@redhat.com> diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 214d74ac6a51..420aee0ae2e5 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -2709,6 +2709,7 @@ enum parport_pc_pci_cards { oxsemi_954, oxsemi_840, aks_0100, + mobility_pp, }; @@ -2792,6 +2793,7 @@ static struct parport_pc_pci { /* oxsemi_954 */ { 1, { { 0, -1 }, } }, /* oxsemi_840 */ { 1, { { 0, -1 }, } }, /* aks_0100 */ { 1, { { 0, 1 }, } }, + /* mobility_pp */ { 1, { { 0, 1 }, } }, }; static struct pci_device_id parport_pc_pci_tbl[] __devinitdata = { @@ -2873,6 +2875,7 @@ static struct pci_device_id parport_pc_pci_tbl[] __devinitdata = { { 0x1409, 0x7268, 0x1409, 0x0103, 0, 0, timedia_4008a }, { 0x1409, 0x7268, 0x1409, 0x0104, 0, 0, timedia_4018 }, { 0x1409, 0x7268, 0x1409, 0x9018, 0, 0, timedia_9018a }, + { 0x14f2, 0x0121, PCI_ANY_ID, PCI_ANY_ID, 0, 0, mobility_pp }, { PCI_VENDOR_ID_SYBA, PCI_DEVICE_ID_SYBA_2P_EPP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_2p_epp }, { PCI_VENDOR_ID_SYBA, PCI_DEVICE_ID_SYBA_1P_ECP, diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 39a78affab4b..f80f9301314d 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c @@ -41,6 +41,11 @@ enum parport_pc_pci_cards { avlab_2s1p, avlab_2s1p_650, avlab_2s1p_850, + siig_1s1p_10x, + siig_2s1p_10x, + siig_2p1s_20x, + siig_1s1p_20x, + siig_2s1p_20x, }; @@ -74,6 +79,11 @@ static struct parport_pc_pci { /* avlab_2s1p */ { 1, { { 2, 3}, } }, /* avlab_2s1p_650 */ { 1, { { 2, 3}, } }, /* avlab_2s1p_850 */ { 1, { { 2, 3}, } }, + /* siig_1s1p_10x */ { 1, { { 3, 4 }, } }, + /* siig_2s1p_10x */ { 1, { { 4, 5 }, } }, + /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } }, + /* siig_1s1p_20x */ { 1, { { 1, 2 }, } }, + /* siig_2s1p_20x */ { 1, { { 2, 3 }, } }, }; static struct pci_device_id parport_serial_pci_tbl[] __devinitdata = { @@ -92,6 +102,37 @@ static struct pci_device_id parport_serial_pci_tbl[] __devinitdata = { { 0x14db, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p}, { 0x14db, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_650}, { 0x14db, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_850}, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_850, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_550, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_650, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_850, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_550, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_650, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_850, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_550, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_650, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_850, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_550, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_650, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x }, + { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_850, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x }, + { 0, } /* terminate list */ }; MODULE_DEVICE_TABLE(pci,parport_serial_pci_tbl); @@ -107,6 +148,16 @@ struct pci_board_no_ids { int first_uart_offset; }; +static int __devinit siig10x_init_fn(struct pci_dev *dev, struct pci_board_no_ids *board, int enable) +{ + return pci_siig10x_fn(dev, NULL, enable); +} + +static int __devinit siig20x_init_fn(struct pci_dev *dev, struct pci_board_no_ids *board, int enable) +{ + return pci_siig20x_fn(dev, NULL, enable); +} + static struct pci_board_no_ids pci_boards[] __devinitdata = { /* * PCI Flags, Number of Ports, Base (Maximum) Baud Rate, @@ -129,6 +180,11 @@ static struct pci_board_no_ids pci_boards[] __devinitdata = { /* avlab_2s1p (n/t) */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, /* avlab_2s1p_650 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, /* avlab_2s1p_850 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, +/* siig_1s1p_10x */ { SPCI_FL_BASE2, 1, 460800, 0, 0, siig10x_init_fn }, +/* siig_2s1p_10x */ { SPCI_FL_BASE2, 1, 921600, 0, 0, siig10x_init_fn }, +/* siig_2p1s_20x */ { SPCI_FL_BASE0, 1, 921600, 0, 0, siig20x_init_fn }, +/* siig_1s1p_20x */ { SPCI_FL_BASE0, 1, 921600, 0, 0, siig20x_init_fn }, +/* siig_2s1p_20x */ { SPCI_FL_BASE0, 1, 921600, 0, 0, siig20x_init_fn }, }; struct parport_serial_private { diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 5be491ff1a35..545f18b055e4 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -107,6 +107,14 @@ pci_setup_bridge(struct pci_bus *bus) DBGC((KERN_INFO "PCI: Bus %d, bridge: %s\n", bus->number, bridge->dev.name)); + /* Add bridge resources to the resource tree. */ + if (bus->resource[0]->end > bus->resource[0]->start && + request_resource(bus->resource[0], bus->resource[0]) < 0) + printk(KERN_ERR "PCI: failed to reserve IO for bus %d\n", bus->number); + if (bus->resource[1]->end > bus->resource[1]->start && + request_resource(bus->resource[1], bus->resource[1]) < 0) + printk(KERN_ERR "PCI: failed to reserve MEM for bus %d\n", bus->number); + /* Set up the top and bottom of the PCI I/O segment for this bus. */ if (bus->resource[0]->flags & IORESOURCE_IO) { pci_read_config_dword(bridge, PCI_IO_BASE, &l); diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index bb5073f903b0..402f4ec86aff 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c @@ -283,6 +283,8 @@ int cb_alloc(socket_info_t * s) dev->hdr_type = hdr & 0x7f; pci_setup_device(dev); + if (pci_enable_device(dev)) + continue; strcpy(dev->dev.bus_id, dev->slot_name); @@ -300,7 +302,6 @@ int cb_alloc(socket_info_t * s) pci_writeb(dev, PCI_INTERRUPT_LINE, irq); } - pci_enable_device(dev); /* XXX check return */ device_register(&dev->dev); pci_insert_device(dev, bus); } diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index 6e3b2f654179..0262afbfd3f0 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c @@ -392,7 +392,11 @@ static int __init init_tcic(void) printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: "); sock = 0; - if (check_region(tcic_base, 16) == 0) { + if (!request_region(tcic_base, 16, "tcic-2")) { + printk("could not allocate ports,\n "); + return -ENODEV; + } + else { tcic_setw(TCIC_ADDR, 0); if (tcic_getw(TCIC_ADDR) == 0) { tcic_setw(TCIC_ADDR, 0xc3a5); @@ -408,16 +412,13 @@ static int __init init_tcic(void) if (tcic_getw(TCIC_ADDR) == 0xc3a5) sock = 2; } } - } else - printk("could not allocate ports, "); - + } if (sock == 0) { printk("not found.\n"); + release_region(tcic_base, 16); return -ENODEV; } - request_region(tcic_base, 16, "tcic-2"); - sockets = 0; for (i = 0; i < sock; i++) { if ((i == ignore) || is_active(i)) continue; diff --git a/drivers/scsi/aic7xxx/aic7770.c b/drivers/scsi/aic7xxx/aic7770.c index 2d11965a7f81..f32adfd9badb 100644 --- a/drivers/scsi/aic7xxx/aic7770.c +++ b/drivers/scsi/aic7xxx/aic7770.c @@ -50,6 +50,7 @@ #define ID_AHA_274x 0x04907771 #define ID_AHA_284xB 0x04907756 /* BIOS enabled */ #define ID_AHA_284x 0x04907757 /* BIOS disabled*/ +#define ID_AIC_7782 0x04907782 static void aha2840_load_seeprom(struct ahc_softc *ahc); static ahc_device_setup_t ahc_aic7770_VL_setup; @@ -77,6 +78,13 @@ struct aic7770_identity aic7770_ident_table [] = 0xFFFFFFFF, "Adaptec aic7770 SCSI adapter", ahc_aic7770_EISA_setup + }, + { + /* (Olivetti 2 channel EISA) */ + ID_AIC_7782, + 0xFFFFFFFF, + "Adaptec aic7782 SCSI adapter", + ahc_aic7770_EISA_setup } }; const int ahc_num_aic7770_devs = NUM_ELEMENTS(aic7770_ident_table); diff --git a/drivers/scsi/inia100.c b/drivers/scsi/inia100.c index 80039be482dc..da8f9484cea6 100644 --- a/drivers/scsi/inia100.c +++ b/drivers/scsi/inia100.c @@ -366,7 +366,11 @@ int inia100_detect(Scsi_Host_Template * tpnt) printk("inia100: initial orchid fail!!\n"); goto out_unalloc; } - request_region(pHCB->HCS_Base, 256, "inia100"); /* Register */ + if (!request_region(pHCB->HCS_Base, 256, "inia100")) { + printk(KERN_WARNING "inia100: io port 0x%x, is busy.\n", + pHCB->HCS_Base); + return (0); + } hreg->io_port = pHCB->HCS_Base; hreg->n_io_port = 0xff; diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 8bafa2164c6c..b3f6089b6c2c 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -83,7 +83,7 @@ /* 2.3.18 and later */ /* - Sync with other changes from the 2.3 kernels */ /* 4.00.06 - Fix timeout with initial FFDC command */ -/* 4.00.06a - Port to 2.4 (trivial) -- Christoph Hellwig <hch@caldera.de> */ +/* 4.00.06a - Port to 2.4 (trivial) -- Christoph Hellwig <hch@infradead.org> */ /* 4.10.00 - Add support for ServeRAID 4M/4L */ /* 4.10.13 - Fix for dynamic unload and proc file system */ /* 4.20.03 - Rename version to coincide with new release schedules */ @@ -190,6 +190,7 @@ #ifdef MODULE static char *ips = NULL; MODULE_PARM(ips, "s"); + MODULE_LICENSE("GPL"); #endif /* @@ -892,7 +893,6 @@ ips_detect(Scsi_Host_Template *SHT) { continue; } - } /* get planer status */ diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 102e96c6398f..4a3d1c3d1ef3 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -168,6 +168,7 @@ struct dev_info scsi_static_device_list[] __initdata = { {"DELL", "PV530F", NULL, BLIST_SPARSELUN}, {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN}, {"HP", "A6189A", NULL, BLIST_SPARSELUN | BLIST_LARGELUN}, /* HP VA7400 */ + {"HP", "OPEN-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, /* HP XP Arrays */ {"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */ {"CNSI", "G7324", NULL, BLIST_SPARSELUN}, /* Chaparral G7324 RAID */ {"CNSi", "G8324", NULL, BLIST_SPARSELUN}, /* Chaparral G8324 RAID */ @@ -181,6 +182,12 @@ struct dev_info scsi_static_device_list[] __initdata = { {"COMPAQ", "MSA1000", NULL, BLIST_FORCELUN}, {"HP", "C1557A", NULL, BLIST_FORCELUN}, {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, + {"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, + {"DDN", "SAN DataDirector", "*", BLIST_SPARSELUN}, + {"HITACHI", "DF400", "*", BLIST_SPARSELUN}, + {"HITACHI", "DF500", "*", BLIST_SPARSELUN}, + {"HITACHI", "DF600", "*", BLIST_SPARSELUN}, + {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, { NULL, NULL, NULL, 0 }, }; diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 25ee745abff7..0a0a6e9ade97 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -474,9 +474,7 @@ sg_new_read(Sg_fd * sfp, char *buf, size_t count, Sg_request * srp) sb_len = (hp->mx_sb_len > sb_len) ? sb_len : hp->mx_sb_len; len = 8 + (int) srp->sense_b[7]; /* Additional sense length field */ len = (len > sb_len) ? sb_len : len; - if ((err = verify_area(VERIFY_WRITE, hp->sbp, len))) - goto err_out; - if (__copy_to_user(hp->sbp, srp->sense_b, len)) { + if (copy_to_user(hp->sbp, srp->sense_b, len)) { err = -EFAULT; goto err_out; } diff --git a/drivers/video/fbcon.c b/drivers/video/fbcon.c index 69374876d64f..0b0db4edcfa0 100644 --- a/drivers/video/fbcon.c +++ b/drivers/video/fbcon.c @@ -230,8 +230,9 @@ static void fbcon_vbl_detect(int irq, void *dummy, struct pt_regs *fp) static void cursor_timer_handler(unsigned long dev_addr); -static struct timer_list cursor_timer = - TIMER_INITIALIZER(cursor_timer_handler, 0, 0); +static struct timer_list cursor_timer = { + function: cursor_timer_handler +}; static void cursor_timer_handler(unsigned long dev_addr) { |
