Commit f6c5dcb1 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://gkernel.bkbits.net/net-drivers-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 29dd2f74 c0c83822
......@@ -39,6 +39,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
#
# General setup
......@@ -112,7 +113,8 @@ CONFIG_FW_LOADER=m
# Graphics support
#
CONFIG_FB=y
# CONFIG_FB_PM2 is not set
CONFIG_FB_PM2=y
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_BW2 is not set
......@@ -123,7 +125,10 @@ CONFIG_FB_CG6=y
# CONFIG_FB_RADEON_OLD is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GX=y
# CONFIG_FB_ATY_XL_INIT is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
......@@ -209,8 +214,8 @@ CONFIG_OBP_FLASH=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_CARMEL=m
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_INITRD is not set
#
# ATA/ATAPI/MFM/RLL support
......@@ -261,7 +266,9 @@ CONFIG_BLK_DEV_SC1200=m
CONFIG_BLK_DEV_PIIX=m
CONFIG_BLK_DEV_NS87415=m
CONFIG_BLK_DEV_PDC202XX_OLD=m
# CONFIG_PDC202XX_BURST is not set
CONFIG_BLK_DEV_PDC202XX_NEW=m
# CONFIG_PDC202XX_FORCE is not set
CONFIG_BLK_DEV_SVWKS=m
CONFIG_BLK_DEV_SIIMAGE=m
CONFIG_BLK_DEV_SLC90E66=m
......@@ -297,6 +304,12 @@ CONFIG_SCSI_REPORT_LUNS=y
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
#
# SCSI Transport Attributes
#
CONFIG_SCSI_SPI_ATTRS=m
CONFIG_SCSI_FC_ATTRS=m
#
# SCSI low-level drivers
#
......@@ -320,6 +333,7 @@ CONFIG_SCSI_SATA_SVW=m
CONFIG_SCSI_ATA_PIIX=m
CONFIG_SCSI_SATA_PROMISE=m
CONFIG_SCSI_SATA_VIA=m
CONFIG_SCSI_SATA_VITESSE=m
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
CONFIG_SCSI_DMX3191D=m
......@@ -663,6 +677,7 @@ CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_DELAY=m
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
......@@ -811,6 +826,11 @@ CONFIG_TMD_HERMES=m
CONFIG_PCI_HERMES=m
CONFIG_ATMEL=m
CONFIG_PCI_ATMEL=m
#
# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
#
CONFIG_PRISM54=m
CONFIG_NET_WIRELESS=y
#
......@@ -819,6 +839,7 @@ CONFIG_NET_WIRELESS=y
# CONFIG_TR is not set
CONFIG_NET_FC=y
CONFIG_SHAPER=m
CONFIG_NETCONSOLE=m
#
# Wan interfaces
......@@ -943,6 +964,10 @@ CONFIG_BT_HCIUART_BCSP_TXCRC=y
CONFIG_BT_HCIBCM203X=m
CONFIG_BT_HCIBFUSB=m
CONFIG_BT_HCIVHCI=m
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
#
# ISDN subsystem
......@@ -1043,11 +1068,13 @@ CONFIG_SERIO_PCIPS2=m
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_KEYBOARD_SUNKBD=y
CONFIG_KEYBOARD_LKKBD=m
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_SERIAL=y
CONFIG_MOUSE_VSXXXAA=m
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
......@@ -1091,24 +1118,32 @@ CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m
#
# I2C Hardware Sensors Chip support
# Hardware Sensors Chip support
#
CONFIG_I2C_SENSOR=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_LM83=m
CONFIG_SENSORS_LM85=m
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_W83L785TS=m
CONFIG_SENSORS_W83627HF=m
#
# Other I2C Chip support
#
CONFIG_SENSORS_EEPROM=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
......@@ -1227,6 +1262,7 @@ CONFIG_NCP_FS=m
# CONFIG_NCPFS_EXTRAS is not set
CONFIG_CODA_FS=m
# CONFIG_CODA_FS_OLD_API is not set
CONFIG_INTERMEZZO_FS=m
CONFIG_AFS_FS=m
CONFIG_RXRPC=m
......@@ -1387,6 +1423,10 @@ CONFIG_SOUND=m
#
CONFIG_SND=m
CONFIG_SND_BIT32_EMUL=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
......@@ -1400,6 +1440,9 @@ CONFIG_SND_SEQUENCER_OSS=y
#
# Generic devices
#
CONFIG_SND_MPU401_UART=m
CONFIG_SND_OPL3_LIB=m
CONFIG_SND_VX_LIB=m
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
# CONFIG_SND_MTPAV is not set
......@@ -1409,7 +1452,12 @@ CONFIG_SND_VIRMIDI=m
#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_ALI5451=m
CONFIG_SND_ATIIXP=m
CONFIG_SND_AU8810=m
CONFIG_SND_AU8820=m
CONFIG_SND_AU8830=m
CONFIG_SND_AZT3328=m
CONFIG_SND_BT87X=m
CONFIG_SND_CS46XX=m
......@@ -1417,6 +1465,7 @@ CONFIG_SND_CS46XX=m
CONFIG_SND_CS4281=m
CONFIG_SND_EMU10K1=m
CONFIG_SND_KORG1212=m
CONFIG_SND_MIXART=m
CONFIG_SND_NM256=m
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
......@@ -1432,9 +1481,11 @@ CONFIG_SND_ES1938=m
CONFIG_SND_ES1968=m
CONFIG_SND_MAESTRO3=m
CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X=m
CONFIG_SND_ICE1712=m
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m
CONFIG_SND_SONICVIBES=m
# CONFIG_SND_VIA82XX is not set
CONFIG_SND_VX222=m
......@@ -1472,6 +1523,7 @@ CONFIG_USB_DEVICEFS=y
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_EHCI_SPLIT_ISO is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_UHCI_HCD=m
......@@ -1508,7 +1560,9 @@ CONFIG_USB_HIDDEV=y
CONFIG_USB_WACOM=m
CONFIG_USB_KBTAB=m
# CONFIG_USB_POWERMATE is not set
CONFIG_USB_MTOUCH=m
# CONFIG_USB_XPAD is not set
CONFIG_USB_ATI_REMOTE=m
#
# USB Imaging devices
......@@ -1543,6 +1597,7 @@ CONFIG_USB_USBNET=m
#
# USB Host-to-Host Cables
#
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_GENESYS=y
......@@ -1614,7 +1669,6 @@ CONFIG_USB_EMI26=m
CONFIG_USB_AUERSWALD=m
CONFIG_USB_RIO500=m
CONFIG_USB_LEGOTOWER=m
# CONFIG_USB_BRLVGER is not set
CONFIG_USB_LCD=m
CONFIG_USB_LED=m
CONFIG_USB_SPEEDTOUCH=m
......
......@@ -352,8 +352,7 @@ dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direct
bad:
spin_unlock_irqrestore(&iommu->lock, flags);
BUG();
return 0;
return PCI_DMA_ERROR_CODE;
}
/* Unmap a single streaming mode DMA translation. */
......@@ -580,8 +579,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
bad:
spin_unlock_irqrestore(&iommu->lock, flags);
BUG();
return 0;
return PCI_DMA_ERROR_CODE;
}
/* Unmap a set of streaming mode DMA translations. */
......
......@@ -214,7 +214,9 @@ EXPORT_SYMBOL(sbus_unmap_single);
EXPORT_SYMBOL(sbus_map_sg);
EXPORT_SYMBOL(sbus_unmap_sg);
EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
#endif
EXPORT_SYMBOL(outsb);
EXPORT_SYMBOL(outsw);
......
......@@ -330,7 +330,7 @@ config BLK_DEV_RAM_SIZE
config BLK_DEV_INITRD
bool "Initial RAM disk (initrd) support"
depends on BLK_DEV_RAM && BLK_DEV_RAM!=m
depends on BLK_DEV_RAM=y
help
The initial RAM disk is a RAM disk that is loaded by the boot loader
(loadlin or lilo) and that is mounted as root before the normal boot
......
......@@ -44,7 +44,7 @@ MODULE_DESCRIPTION("Promise SATA SX8 (carmel) block driver");
#undef CARM_NDEBUG
#define DRV_NAME "carmel"
#define DRV_VERSION "0.7"
#define DRV_VERSION "0.8"
#define PFX DRV_NAME ": "
#define NEXT_RESP(idx) ((idx + 1) % RMSG_Q_LEN)
......@@ -173,10 +173,11 @@ enum {
FW_VER_ZCR = (1 << 0), /* zero channel RAID (whatever that is) */
/* carm_host flags */
FL_DAC = (1 << 0),
FL_NON_RAID = FW_VER_NON_RAID,
FL_4PORT = FW_VER_4PORT,
FL_FW_VER_MASK = (FW_VER_NON_RAID | FW_VER_4PORT),
FL_DAC = (1 << 16),
FL_DYN_MAJOR = (1 << 17),
};
enum scatter_gather_types {
......@@ -244,7 +245,11 @@ struct carm_host {
void *mmio;
void *shm;
dma_addr_t shm_dma;
int major;
int id;
char name[32];
spinlock_t lock;
struct pci_dev *pdev;
unsigned int state;
......@@ -401,6 +406,7 @@ static struct block_device_operations carm_bd_ops = {
};
static unsigned int carm_host_id;
static unsigned long carm_major_alloc;
......@@ -1507,8 +1513,8 @@ static int carm_init_disks(struct carm_host *host)
}
port->disk = disk;
sprintf(disk->disk_name, DRV_NAME "%u_%u", carm_host_id, i);
sprintf(disk->devfs_name, DRV_NAME "/%u_%u", carm_host_id, i);
sprintf(disk->disk_name, DRV_NAME "%u_%u", host->id, i);
sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
disk->major = host->major;
disk->first_minor = i * CARM_MINORS_PER_MAJOR;
disk->fops = &carm_bd_ops;
......@@ -1651,9 +1657,23 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
host->oob_q = q;
q->queuedata = host;
rc = register_blkdev(0, DRV_NAME);
/*
* Figure out which major to use: 160, 161, or dynamic
*/
if (!test_and_set_bit(0, &carm_major_alloc))
host->major = 160;
else if (!test_and_set_bit(1, &carm_major_alloc))
host->major = 161;
else
host->flags |= FL_DYN_MAJOR;
host->id = carm_host_id;
sprintf(host->name, DRV_NAME "%d", carm_host_id);
rc = register_blkdev(host->major, host->name);
if (rc < 0)
goto err_out_free_oob;
goto err_out_free_majors;
if (host->flags & FL_DYN_MAJOR)
host->major = rc;
devfs_mk_dir(DRV_NAME);
......@@ -1678,11 +1698,10 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
DPRINTK("waiting for probe_sem\n");
down(&host->probe_sem);
/* TODO: wait for probing to end */
printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
pci_resource_start(pdev, 0), pdev->irq, host->major);
printk(KERN_ERR DRV_NAME "(%s): registered host, %d ports, mmio %lx\n",
pci_name(pdev), (int) CARM_MAX_PORTS,
pci_resource_start(pdev, 0));
carm_host_id++;
pci_set_drvdata(pdev, host);
return 0;
......@@ -1691,8 +1710,12 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
free_irq(pdev->irq, host);
err_out_blkdev_disks:
carm_free_disks(host);
unregister_blkdev(host->major, DRV_NAME);
err_out_free_oob:
unregister_blkdev(host->major, host->name);
err_out_free_majors:
if (host->major == 160)
clear_bit(0, &carm_major_alloc);
else if (host->major == 161)
clear_bit(1, &carm_major_alloc);
blk_cleanup_queue(host->oob_q);
err_out_pci_free:
pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
......@@ -1720,13 +1743,18 @@ static void carm_remove_one (struct pci_dev *pdev)
free_irq(pdev->irq, host);
carm_free_disks(host);
devfs_remove(DRV_NAME);
unregister_blkdev(host->major, DRV_NAME);
unregister_blkdev(host->major, host->name);
if (host->major == 160)
clear_bit(0, &carm_major_alloc);
else if (host->major == 161)
clear_bit(1, &carm_major_alloc);
blk_cleanup_queue(host->oob_q);
pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
iounmap(host->mmio);
kfree(host);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
static int __init carm_init(void)
......
......@@ -434,14 +434,14 @@ static void reset_config(struct pm2fb_par* p)
pm2_RDAC_WR(p, PM2I_RD_BLUE_KEY, 0);
}
static void set_aperture(struct pm2fb_par* p)
static void set_aperture(struct pm2fb_par* p, u32 depth)
{
WAIT_FIFO(p, 4);
#ifdef __LITTLE_ENDIAN
pm2_WR(p, PM2R_APERTURE_ONE, 0);
pm2_WR(p, PM2R_APERTURE_TWO, 0);
#else
switch (p->depth) {
switch (depth) {
case 8:
case 24:
pm2_WR(p, PM2R_APERTURE_ONE, 0);
......@@ -744,7 +744,7 @@ static int pm2fb_set_par(struct fb_info *info)
pm2_WR(par, PM2VR_RD_INDEX_HIGH, 0);
}
set_aperture(par);
set_aperture(par, depth);
DEFRW();
WAIT_FIFO(par, 19);
......
......@@ -213,6 +213,13 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
*/
}
#define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0)
static inline int pci_dma_error(dma_addr_t dma_addr)
{
return (dma_addr == PCI_DMA_ERROR_CODE);
}
/* Return the index of the PCI controller for device PDEV. */
extern int pci_domain_nr(struct pci_bus *bus);
......
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