projects/linux·commit 1685e633

Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6

1685e633 · Linus Torvalds <[email protected]> · 2010-08-06 12:25:06 -07:00

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq
  pcmcia: do not request windows if you don't need to
  pcmcia: insert PCMCIA device resources into resource tree
  pcmcia: export resource information to sysfs
  pcmcia: use struct resource for PCMCIA devices, part 2
  pcmcia: remove memreq_t
  pcmcia: move local definitions out of include/pcmcia/cs.h
  pcmcia: do not use io_req_t when calling pcmcia_request_io()
  pcmcia: do not use io_req_t after call to pcmcia_request_io()
  pcmcia: use struct resource for PCMCIA devices
  pcmcia: clean up cs.h
  pcmcia: use pcmica_{read,write}_config_byte
  pcmcia: remove cs_types.h
  pcmcia: remove unused flag, simplify headers
  pcmcia: remove obsolete CS_EVENT_ definitions
  pcmcia: split up central event handler
  pcmcia: simplify event callback
  pcmcia: remove obsolete ioctl

Conflicts in:
 - drivers/staging/comedi/drivers/*
 - drivers/staging/wlags49_h2/wl_cs.c
due to dev_info_t and whitespace changes
Commit
1685e633b396b0f3dabbc9fa5d65dfefe6435250
Parents
1cfd2bda · 127c03cd

Merge commit. Changes below are compared with the first parent: 1cfd2bda.

Changes

97 files changed · +1197 −3195

FileStatusAddDelContent
Documentation/feature-removal-schedule.txtmodified+0−23View file
Documentation/pcmcia/driver-changes.txtmodified+12−0View file
drivers/ata/pata_pcmcia.cmodified+19−19View file
drivers/bluetooth/bluecard_cs.cmodified+15−17View file
drivers/bluetooth/bt3c_cs.cmodified+13−14View file
drivers/bluetooth/btuart_cs.cmodified+15−16View file
drivers/bluetooth/dtl1_cs.cmodified+17−18View file
drivers/char/pcmcia/cm4000_cs.cmodified+12−18View file
drivers/char/pcmcia/cm4040_cs.cmodified+14−23View file
drivers/char/pcmcia/ipwireless/main.cmodified+13−34View file
drivers/char/pcmcia/ipwireless/main.hmodified+0−1View file
drivers/char/pcmcia/ipwireless/tty.hmodified+0−1View file
drivers/char/pcmcia/synclink_cs.cmodified+12−17View file
drivers/ide/ide-cs.cmodified+20−19View file
drivers/isdn/hardware/avm/avm_cs.cmodified+10−15View file
drivers/isdn/hisax/avma1_cs.cmodified+13−16View file
drivers/isdn/hisax/elsa_cs.cmodified+15−17View file
drivers/isdn/hisax/sedlbauer_cs.cmodified+21−62View file
drivers/isdn/hisax/teles_cs.cmodified+14−16View file
drivers/mmc/host/sdricoh_cs.cmodified+0−1View file
drivers/mtd/maps/pcmciamtd.cmodified+6−9View file
drivers/net/pcmcia/3c574_cs.cmodified+7−7View file
drivers/net/pcmcia/3c589_cs.cmodified+7−7View file
drivers/net/pcmcia/axnet_cs.cmodified+24−24View file
drivers/net/pcmcia/com20020_cs.cmodified+12−10View file
drivers/net/pcmcia/fmvj18x_cs.cmodified+21−27View file
drivers/net/pcmcia/ibmtr_cs.cmodified+11−18View file
drivers/net/pcmcia/nmclan_cs.cmodified+11−21View file
drivers/net/pcmcia/pcnet_cs.cmodified+28−35View file
drivers/net/pcmcia/smc91c92_cs.cmodified+33−38View file
drivers/net/pcmcia/xirc2ps_cs.cmodified+27−33View file
drivers/net/wireless/airo_cs.cmodified+16−58View file
drivers/net/wireless/atmel_cs.cmodified+11−14View file
drivers/net/wireless/b43/pcmcia.cmodified+2−11View file
drivers/net/wireless/hostap/hostap_cs.cmodified+43−93View file
drivers/net/wireless/libertas/if_cs.cmodified+7−9View file
drivers/net/wireless/orinoco/orinoco_cs.cmodified+14−16View file
drivers/net/wireless/orinoco/spectrum_cs.cmodified+24−38View file
drivers/net/wireless/ray_cs.cmodified+5−22View file
drivers/net/wireless/wl3501_cs.cmodified+8−16View file
drivers/parport/parport_cs.cmodified+12−11View file
drivers/pcmcia/Makefilemodified+0−1View file
drivers/pcmcia/au1000_generic.hmodified+0−1View file
drivers/pcmcia/au1000_pb1x00.cmodified+0−2View file
drivers/pcmcia/cistpl.cmodified+7−4View file
drivers/pcmcia/cs.cmodified+16−63View file
drivers/pcmcia/cs_internal.hmodified+17−45View file
drivers/pcmcia/db1xxx_ss.cmodified+0−1View file
drivers/pcmcia/ds.cmodified+84−100View file
drivers/pcmcia/i82092.cmodified+0−1View file
drivers/pcmcia/i82365.cmodified+0−1View file
drivers/pcmcia/m32r_cfc.cmodified+0−1View file
drivers/pcmcia/m32r_pcc.cmodified+0−1View file
drivers/pcmcia/m8xx_pcmcia.cmodified+0−1View file
drivers/pcmcia/pcmcia_cis.cmodified+0−1View file
drivers/pcmcia/pcmcia_ioctl.cdeleted+0−1077View before deletion
drivers/pcmcia/pcmcia_resource.cmodified+183−148View file
drivers/pcmcia/pd6729.cmodified+0−1View file
drivers/pcmcia/pxa2xx_base.cmodified+0−1View file
drivers/pcmcia/rsrc_iodyn.cmodified+4−4View file
drivers/pcmcia/rsrc_mgr.cmodified+2−4View file
drivers/pcmcia/rsrc_nonstatic.cmodified+7−8View file
drivers/pcmcia/sa1100_generic.cmodified+0−1View file
drivers/pcmcia/soc_common.hmodified+0−1View file
drivers/pcmcia/socket_sysfs.cmodified+0−1View file
drivers/pcmcia/tcic.cmodified+0−1View file
drivers/pcmcia/xxs1500_ss.cmodified+0−1View file
drivers/pcmcia/yenta_socket.cmodified+0−1View file
drivers/scsi/pcmcia/aha152x_stub.cmodified+8−9View file
drivers/scsi/pcmcia/fdomain_stub.cmodified+7−8View file
drivers/scsi/pcmcia/nsp_cs.cmodified+28−33View file
drivers/scsi/pcmcia/qlogic_stub.cmodified+16−17View file
drivers/scsi/pcmcia/sym53c500_cs.cmodified+15−16View file
drivers/serial/serial_cs.cmodified+33−35View file
drivers/ssb/main.cmodified+0−1View file
drivers/ssb/pcmcia.cmodified+2−13View file
drivers/ssb/scan.cmodified+0−1View file
drivers/staging/comedi/drivers/cb_das16_cs.cmodified+17−30View file
drivers/staging/comedi/drivers/das08_cs.cmodified+17−29View file
drivers/staging/comedi/drivers/ni_daq_700.cmodified+18−54View file
drivers/staging/comedi/drivers/ni_daq_dio24.cmodified+18−55View file
drivers/staging/comedi/drivers/ni_labpc_cs.cmodified+18−55View file
drivers/staging/comedi/drivers/ni_mio_cs.cmodified+8−11View file
drivers/staging/comedi/drivers/quatech_daqp_cs.cmodified+18−31View file
drivers/staging/wlags49_h2/wl_cs.cmodified+5−6View file
drivers/staging/wlags49_h2/wl_internal.hmodified+0−1View file
drivers/telephony/ixj_pcmcia.cmodified+10−10View file
drivers/usb/host/sl811_cs.cmodified+10−14View file
include/pcmcia/cistpl.hmodified+2−0View file
include/pcmcia/cs.hmodified+14−143View file
include/pcmcia/cs_types.hdeleted+0−40View before deletion
include/pcmcia/ds.hmodified+36−215View file
include/pcmcia/ss.hmodified+3−22View file
sound/pcmcia/pdaudiocf/pdaudiocf.cmodified+5−4View file
sound/pcmcia/pdaudiocf/pdaudiocf.hmodified+0−1View file
sound/pcmcia/vx/vxpocket.cmodified+5−4View file
sound/pcmcia/vx/vxpocket.hmodified+0−1View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/feature-removal-schedule.txt

View file
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index be7030e..6fdb837 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -116,29 +116,6 @@ Who: Mauro Carvalho Chehab <[email protected]>
---------------------------
-What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
-When: 2.6.35/2.6.36
-Files: drivers/pcmcia/: pcmcia_ioctl.c
-Why: With the 16-bit PCMCIA subsystem now behaving (almost) like a
- normal hotpluggable bus, and with it using the default kernel
- infrastructure (hotplug, driver core, sysfs) keeping the PCMCIA
- control ioctl needed by cardmgr and cardctl from pcmcia-cs is
- unnecessary and potentially harmful (it does not provide for
- proper locking), and makes further cleanups and integration of the
- PCMCIA subsystem into the Linux kernel device driver model more
- difficult. The features provided by cardmgr and cardctl are either
- handled by the kernel itself now or are available in the new
- pcmciautils package available at
- http://kernel.org/pub/linux/utils/kernel/pcmcia/
-
- For all architectures except ARM, the associated config symbol
- has been removed from kernel 2.6.34; for ARM, it will be likely
- be removed from kernel 2.6.35. The actual code will then likely
- be removed from kernel 2.6.36.
-Who: Dominik Brodowski <[email protected]>
-
----------------------------
-
What: sys_sysctl
When: September 2010
Option: CONFIG_SYSCTL_SYSCALL

Documentation/pcmcia/driver-changes.txt

View file
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index 61bc4e9..26c0f9c 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -1,4 +1,16 @@
This file details changes in 2.6 which affect PCMCIA card driver authors:
+* pcmcia_request_io changes (as of 2.6.36)
+ Instead of io_req_t, drivers are now requested to fill out
+ struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
+ ranges. After a call to pcmcia_request_io(), the ports found there
+ are reserved, after calling pcmcia_request_configuration(), they may
+ be used.
+
+* No dev_info_t, no cs_types.h (as of 2.6.36)
+ dev_info_t and a few other typedefs are removed. No longer use them
+ in PCMCIA device drivers. Also, do not include pcmcia/cs_types.h, as
+ this file is gone.
+
* No dev_node_t (as of 2.6.35)
There is no more need to fill out a "dev_node_t" structure.

drivers/ata/pata_pcmcia.c

View file
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 118c28e..e944aa0 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -34,7 +34,6 @@
#include <linux/ata.h>
#include <linux/libata.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
@@ -201,23 +200,25 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev,
if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
- pdev->io.BasePort1 = io->win[0].base;
- pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
- if (!(io->flags & CISTPL_IO_16BIT))
- pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+ pdev->io_lines = io->flags & CISTPL_IO_LINES_MASK;
+ pdev->resource[0]->start = io->win[0].base;
+ if (!(io->flags & CISTPL_IO_16BIT)) {
+ pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
+ pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
+ }
if (io->nwin == 2) {
- pdev->io.NumPorts1 = 8;
- pdev->io.BasePort2 = io->win[1].base;
- pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1;
- if (pcmcia_request_io(pdev, &pdev->io) != 0)
+ pdev->resource[0]->end = 8;
+ pdev->resource[1]->start = io->win[1].base;
+ pdev->resource[1]->end = (stk->is_kme) ? 2 : 1;
+ if (pcmcia_request_io(pdev) != 0)
return -ENODEV;
- stk->ctl_base = pdev->io.BasePort2;
+ stk->ctl_base = pdev->resource[1]->start;
} else if ((io->nwin == 1) && (io->win[0].len >= 16)) {
- pdev->io.NumPorts1 = io->win[0].len;
- pdev->io.NumPorts2 = 0;
- if (pcmcia_request_io(pdev, &pdev->io) != 0)
+ pdev->resource[0]->end = io->win[0].len;
+ pdev->resource[1]->end = 0;
+ if (pcmcia_request_io(pdev) != 0)
return -ENODEV;
- stk->ctl_base = pdev->io.BasePort1 + 0x0e;
+ stk->ctl_base = pdev->resource[0]->start + 0x0e;
} else
return -ENODEV;
/* If we've got this far, we're done */
@@ -246,9 +247,8 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
struct ata_port_operations *ops = &pcmcia_port_ops;
/* Set up attributes in order to probe card and get resources */
- pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
- pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
- pdev->io.IOAddrLines = 3;
+ pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
+ pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
pdev->conf.Attributes = CONF_ENABLE_IRQ;
pdev->conf.IntType = INT_MEMORY_AND_IO;
@@ -271,7 +271,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk))
goto failed; /* No suitable config found */
}
- io_base = pdev->io.BasePort1;
+ io_base = pdev->resource[0]->start;
ctl_base = stk->ctl_base;
if (!pdev->irq)
goto failed;
@@ -294,7 +294,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
/* FIXME: Could be more ports at base + 0x10 but we only deal with
one right now */
- if (pdev->io.NumPorts1 >= 0x20)
+ if (resource_size(pdev->resource[0]) >= 0x20)
n_ports = 2;
if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620)

drivers/bluetooth/bluecard_cs.c

View file
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 6d34f40..d52e90a 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -39,7 +39,6 @@
#include <linux/skbuff.h>
#include <linux/io.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
@@ -160,7 +159,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev);
static void bluecard_activity_led_timeout(u_long arg)
{
bluecard_info_t *info = (bluecard_info_t *)arg;
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
return;
@@ -177,7 +176,7 @@ static void bluecard_activity_led_timeout(u_long arg)
static void bluecard_enable_activity_led(bluecard_info_t *info)
{
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
return;
@@ -233,7 +232,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
}
do {
- register unsigned int iobase = info->p_dev->io.BasePort1;
+ register unsigned int iobase = info->p_dev->resource[0]->start;
register unsigned int offset;
register unsigned char command;
register unsigned long ready_bit;
@@ -380,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
return;
}
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
if (test_bit(XMIT_SENDING_READY, &(info->tx_state)))
bluecard_enable_activity_led(info);
@@ -509,7 +508,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)
if (!test_bit(CARD_READY, &(info->hw_state)))
return IRQ_HANDLED;
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
spin_lock(&(info->lock));
@@ -623,7 +622,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
static int bluecard_hci_open(struct hci_dev *hdev)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -643,7 +642,7 @@ static int bluecard_hci_open(struct hci_dev *hdev)
static int bluecard_hci_close(struct hci_dev *hdev)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
return 0;
@@ -710,7 +709,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l
static int bluecard_open(bluecard_info_t *info)
{
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev;
unsigned char id;
@@ -829,7 +828,7 @@ static int bluecard_open(bluecard_info_t *info)
static int bluecard_close(bluecard_info_t *info)
{
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev = info->hdev;
if (!hdev)
@@ -866,9 +865,6 @@ static int bluecard_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = info;
- link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
- link->io.NumPorts1 = 8;
-
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -891,12 +887,14 @@ static int bluecard_config(struct pcmcia_device *link)
int i, n;
link->conf.ConfigIndex = 0x20;
- link->io.NumPorts1 = 64;
- link->io.IOAddrLines = 6;
+
+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
+ link->resource[0]->end = 64;
+ link->io_lines = 6;
for (n = 0; n < 0x400; n += 0x40) {
- link->io.BasePort1 = n ^ 0x300;
- i = pcmcia_request_io(link, &link->io);
+ link->resource[0]->start = n ^ 0x300;
+ i = pcmcia_request_io(link);
if (i == 0)
break;
}

drivers/bluetooth/bt3c_cs.c

View file
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 21e05fd..7ab8f29 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -45,7 +45,6 @@
#include <linux/device.h>
#include <linux/firmware.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
@@ -189,7 +188,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
return;
do {
- register unsigned int iobase = info->p_dev->io.BasePort1;
+ register unsigned int iobase = info->p_dev->resource[0]->start;
register struct sk_buff *skb;
register int len;
@@ -227,7 +226,7 @@ static void bt3c_receive(bt3c_info_t *info)
return;
}
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
avail = bt3c_read(iobase, 0x7006);
//printk("bt3c_cs: receiving %d bytes\n", avail);
@@ -348,7 +347,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
/* our irq handler is shared */
return IRQ_NONE;
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
spin_lock(&(info->lock));
@@ -481,7 +480,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
unsigned int iobase, size, addr, fcs, tmp;
int i, err = 0;
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
/* Reset */
bt3c_io_write(iobase, 0x8040, 0x0404);
@@ -658,8 +657,8 @@ static int bt3c_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = info;
- link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
- link->io.NumPorts1 = 8;
+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
+ link->resource[0]->end = 8;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -684,14 +683,14 @@ static int bt3c_check_config(struct pcmcia_device *p_dev,
{
unsigned long try = (unsigned long) priv_data;
+ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
+
if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
(cf->io.win[0].base != 0)) {
- p_dev->io.BasePort1 = cf->io.win[0].base;
- p_dev->io.IOAddrLines = (try == 0) ? 16 :
- cf->io.flags & CISTPL_IO_LINES_MASK;
- if (!pcmcia_request_io(p_dev, &p_dev->io))
+ p_dev->resource[0]->start = cf->io.win[0].base;
+ if (!pcmcia_request_io(p_dev))
return 0;
}
return -ENODEV;
@@ -708,9 +707,9 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
for (j = 0; j < 5; j++) {
- p_dev->io.BasePort1 = base[j];
- p_dev->io.IOAddrLines = base[j] ? 16 : 3;
- if (!pcmcia_request_io(p_dev, &p_dev->io))
+ p_dev->resource[0]->start = base[j];
+ p_dev->io_lines = base[j] ? 16 : 3;
+ if (!pcmcia_request_io(p_dev))
return 0;
}
}

drivers/bluetooth/btuart_cs.c

View file
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 4ed7288..1c4f5e8 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -41,7 +41,6 @@
#include <asm/system.h>
#include <asm/io.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
@@ -143,7 +142,7 @@ static void btuart_write_wakeup(btuart_info_t *info)
}
do {
- register unsigned int iobase = info->p_dev->io.BasePort1;
+ register unsigned int iobase = info->p_dev->resource[0]->start;
register struct sk_buff *skb;
register int len;
@@ -184,7 +183,7 @@ static void btuart_receive(btuart_info_t *info)
return;
}
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
do {
info->hdev->stat.byte_rx++;
@@ -298,7 +297,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
/* our irq handler is shared */
return IRQ_NONE;
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
spin_lock(&(info->lock));
@@ -355,7 +354,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)
return;
}
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
spin_lock_irqsave(&(info->lock), flags);
@@ -479,7 +478,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon
static int btuart_open(btuart_info_t *info)
{
unsigned long flags;
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev;
spin_lock_init(&(info->lock));
@@ -549,7 +548,7 @@ static int btuart_open(btuart_info_t *info)
static int btuart_close(btuart_info_t *info)
{
unsigned long flags;
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev = info->hdev;
if (!hdev)
@@ -587,8 +586,8 @@ static int btuart_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = info;
- link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
- link->io.NumPorts1 = 8;
+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
+ link->resource[0]->end = 8;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -613,14 +612,14 @@ static int btuart_check_config(struct pcmcia_device *p_dev,
{
int *try = priv_data;
+ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
+
if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
(cf->io.win[0].base != 0)) {
- p_dev->io.BasePort1 = cf->io.win[0].base;
- p_dev->io.IOAddrLines = (*try == 0) ? 16 :
- cf->io.flags & CISTPL_IO_LINES_MASK;
- if (!pcmcia_request_io(p_dev, &p_dev->io))
+ p_dev->resource[0]->start = cf->io.win[0].base;
+ if (!pcmcia_request_io(p_dev))
return 0;
}
return -ENODEV;
@@ -637,9 +636,9 @@ static int btuart_check_config_notpicky(struct pcmcia_device *p_dev,
if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
for (j = 0; j < 5; j++) {
- p_dev->io.BasePort1 = base[j];
- p_dev->io.IOAddrLines = base[j] ? 16 : 3;
- if (!pcmcia_request_io(p_dev, &p_dev->io))
+ p_dev->resource[0]->start = base[j];
+ p_dev->io_lines = base[j] ? 16 : 3;
+ if (!pcmcia_request_io(p_dev))
return 0;
}
}

drivers/bluetooth/dtl1_cs.c

View file
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index cbe9e44..db7c8db 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -41,7 +41,6 @@
#include <asm/system.h>
#include <asm/io.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
@@ -150,7 +149,7 @@ static void dtl1_write_wakeup(dtl1_info_t *info)
}
do {
- register unsigned int iobase = info->p_dev->io.BasePort1;
+ register unsigned int iobase = info->p_dev->resource[0]->start;
register struct sk_buff *skb;
register int len;
@@ -215,7 +214,7 @@ static void dtl1_receive(dtl1_info_t *info)
return;
}
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
do {
info->hdev->stat.byte_rx++;
@@ -302,7 +301,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
/* our irq handler is shared */
return IRQ_NONE;
- iobase = info->p_dev->io.BasePort1;
+ iobase = info->p_dev->resource[0]->start;
spin_lock(&(info->lock));
@@ -462,7 +461,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
static int dtl1_open(dtl1_info_t *info)
{
unsigned long flags;
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev;
spin_lock_init(&(info->lock));
@@ -509,7 +508,8 @@ static int dtl1_open(dtl1_info_t *info)
outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */
outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR);
- info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) & UART_MSR_RI;
+ info->ri_latch = inb(info->p_dev->resource[0]->start + UART_MSR)
+ & UART_MSR_RI;
/* Turn on interrupts */
outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
@@ -534,7 +534,7 @@ static int dtl1_open(dtl1_info_t *info)
static int dtl1_close(dtl1_info_t *info)
{
unsigned long flags;
- unsigned int iobase = info->p_dev->io.BasePort1;
+ unsigned int iobase = info->p_dev->resource[0]->start;
struct hci_dev *hdev = info->hdev;
if (!hdev)
@@ -572,8 +572,8 @@ static int dtl1_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = info;
- link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
- link->io.NumPorts1 = 8;
+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
+ link->resource[0]->end = 8;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -597,14 +597,13 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev,
unsigned int vcc,
void *priv_data)
{
- if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
- p_dev->io.BasePort1 = cf->io.win[0].base;
- p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */
- p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
- if (!pcmcia_request_io(p_dev, &p_dev->io))
- return 0;
- }
- return -ENODEV;
+ if ((cf->io.nwin != 1) || (cf->io.win[0].len <= 8))
+ return -ENODEV;
+
+ p_dev->resource[0]->start = cf->io.win[0].base;
+ p_dev->resource[0]->end = cf->io.win[0].len; /*yo */
+ p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK;
+ return pcmcia_request_io(p_dev);
}
static int dtl1_config(struct pcmcia_device *link)
@@ -613,7 +612,7 @@ static int dtl1_config(struct pcmcia_device *link)
int i;
/* Look for a generic full-sized window */
- link->io.NumPorts1 = 8;
+ link->resource[0]->end = 8;
if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
goto failed;

drivers/char/pcmcia/cm4000_cs.c

View file
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index e7956ac..ec73d9f 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -34,7 +34,6 @@
#include <linux/uaccess.h>
#include <linux/io.h>
-#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
@@ -422,7 +421,7 @@ static struct card_fixup card_fixups[] = {
static void set_cardparameter(struct cm4000_dev *dev)
{
int i;
- unsigned int iobase = dev->p_dev->io.BasePort1;
+ unsigned int iobase = dev->p_dev->resource[0]->start;
u_int8_t stopbits = 0x02; /* ISO default */
DEBUGP(3, dev, "-> set_cardparameter\n");
@@ -455,7 +454,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
unsigned short num_bytes_read;
unsigned char pts_reply[4];
ssize_t rc;
- unsigned int iobase = dev->p_dev->io.BasePort1;
+ unsigned int iobase = dev->p_dev->resource[0]->start;
rc = 0;
@@ -664,7 +663,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
static void monitor_card(unsigned long p)
{

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/cm4040_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/ipwireless/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/ipwireless/main.h

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/ipwireless/tty.h

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/synclink_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/ide/ide-cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/hardware/avm/avm_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/hisax/avma1_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/hisax/elsa_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/hisax/sedlbauer_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/hisax/teles_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/host/sdricoh_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pcmciamtd.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/3c574_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/3c589_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/axnet_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/com20020_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/fmvj18x_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/ibmtr_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/nmclan_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/pcnet_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/smc91c92_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/pcmcia/xirc2ps_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/airo_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/atmel_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/b43/pcmcia.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/hostap/hostap_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/libertas/if_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/orinoco/orinoco_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/orinoco/spectrum_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/ray_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/wl3501_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/parport/parport_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/au1000_generic.h

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/au1000_pb1x00.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/cistpl.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/cs_internal.h

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/db1xxx_ss.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/ds.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/i82092.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/i82365.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/m32r_cfc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/m32r_pcc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/m8xx_pcmcia.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pcmcia_cis.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pcmcia_ioctl.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pcmcia_resource.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pd6729.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pxa2xx_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/rsrc_iodyn.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/rsrc_mgr.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/rsrc_nonstatic.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/sa1100_generic.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/soc_common.h

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/socket_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/tcic.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/xxs1500_ss.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/yenta_socket.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pcmcia/aha152x_stub.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pcmcia/fdomain_stub.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pcmcia/nsp_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pcmcia/qlogic_stub.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pcmcia/sym53c500_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/serial/serial_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/ssb/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/ssb/pcmcia.c

View file

This diff is incomplete. Download the complete patch.

drivers/ssb/scan.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/cb_das16_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/das08_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/ni_daq_700.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/ni_daq_dio24.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/ni_labpc_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/ni_mio_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/comedi/drivers/quatech_daqp_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/wlags49_h2/wl_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/wlags49_h2/wl_internal.h

View file

This diff is incomplete. Download the complete patch.

drivers/telephony/ixj_pcmcia.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/sl811_cs.c

View file

This diff is incomplete. Download the complete patch.

include/pcmcia/cistpl.h

View file

This diff is incomplete. Download the complete patch.

include/pcmcia/cs.h

View file

This diff is incomplete. Download the complete patch.

include/pcmcia/cs_types.h

View before deletion

This diff is incomplete. Download the complete patch.

include/pcmcia/ds.h

View file

This diff is incomplete. Download the complete patch.

include/pcmcia/ss.h

View file

This diff is incomplete. Download the complete patch.

sound/pcmcia/pdaudiocf/pdaudiocf.c

View file

This diff is incomplete. Download the complete patch.

sound/pcmcia/pdaudiocf/pdaudiocf.h

View file

This diff is incomplete. Download the complete patch.

sound/pcmcia/vx/vxpocket.c

View file

This diff is incomplete. Download the complete patch.

sound/pcmcia/vx/vxpocket.h

View file

This diff is incomplete. Download the complete patch.