Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, >Are these lines different from what you see on a working kernel? dmesg is same between working kernel and 2.6.36-rc3. but 2.6.36-rc3(+patch) , the serial part still does not work. - Original Message - >Date: Fri, 17 Sep 2010 20:52:12 +0200 >From: Dominik Brodowski >To: Komuro >Cc: linux-pcmcia@lists.infradead.org, linux-ser...@vger.kernel.org >Subject: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when > calling pcmcia_request_io() > > >Dear Komuro, > >On Fri, Sep 17, 2010 at 10:06:51PM +0900, Komuro wrote: >> Xircom multi-function card still does not work. > >Huh, that is indeed surprising, as the dmesg has all the usual config >descriptions: > >eth0: Xircom: port 0x300, irq 18, hwaddr 00:10:a4:f3:db:02 >... >0.1: ttyS3 at I/O 0x2e8 (irq = 18) is a 16550A > >Are these lines different from what you see on a working kernel? > >Best, > Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 09/15] pcmcia: Documentation update
On Fri, 3 Sep 2010 12:57:08 +0200 Dominik Brodowski wrote: > Fill in missing descriptions and update some others for functions in > pcmcia_resource.c. > > Signed-off-by: Dominik Brodowski kernel-doc notation (beginning with /**) needs to have function parameters listed also, please. Otherwise it generates warnings when used in docbook. OK, I see a few of the functions have that, but they have a '-' following the parameter name instead of a ':'. Please change them to ':' (but yes, the function name itself is followed by a '-'). > --- > drivers/pcmcia/pcmcia_resource.c | 93 > +- > 1 files changed, 71 insertions(+), 22 deletions(-) > > diff --git a/drivers/pcmcia/pcmcia_resource.c > b/drivers/pcmcia/pcmcia_resource.c > index f778e6c..511ae78 100644 > --- a/drivers/pcmcia/pcmcia_resource.c > +++ b/drivers/pcmcia/pcmcia_resource.c > @@ -55,6 +55,10 @@ struct resource *pcmcia_find_mem_region(u_long base, > u_long num, u_long align, > } > > > +/** > + * release_io_space() - release IO ports allocated with alloc_io_space() > + * > + */ missing function params > static void release_io_space(struct pcmcia_socket *s, struct resource *res) > { > resource_size_t num = resource_size(res); > @@ -80,9 +84,11 @@ static void release_io_space(struct pcmcia_socket *s, > struct resource *res) > } > } > } > -} /* release_io_space */ > +} > > -/** alloc_io_space > + > +/** > + * alloc_io_space() - allocate IO ports for use by a PCMCIA device ditto > * > * Special stuff for managing IO windows, because they are scarce > */ > @@ -134,7 +140,7 @@ static int alloc_io_space(struct pcmcia_socket *s, struct > resource *res, > } > dev_dbg(&s->dev, "alloc_io_space request result %d: %pR\n", ret, res); > return ret; > -} /* alloc_io_space */ > +} > > > /** > @@ -203,6 +209,13 @@ int pcmcia_write_config_byte(struct pcmcia_device > *p_dev, off_t where, u8 val) > EXPORT_SYMBOL(pcmcia_write_config_byte); > > > +/** > + * pcmcia_map_mem_page() - modify IO window to point to a different offset ditto > + * > + * pcmcia_map_mem_page() modifies what can be read and written by accessing > + * an iomem range previously enabled by pcmcia_request_window(), by setting > + * the card_offset value to @offset. > + */ > int pcmcia_map_mem_page(struct pcmcia_device *p_dev, struct resource *res, > unsigned int offset) > { > @@ -312,6 +325,16 @@ unlock: > EXPORT_SYMBOL(pcmcia_fixup_vpp); > > > +/** > + * pcmcia_release_configuration() - physically disable a PCMCIA device ditto > + * > + * pcmcia_release_configuration() is the 1:1 counterpart to > + * pcmcia_enable_device(): If a PCMCIA device is no longer used by any > + * driver, the Vpp voltage is set to 0, IRQs will no longer be generated, > + * and I/O ranges will be disabled. As pcmcia_release_io() and > + * pcmcia_release_window() still need to be called, device drivers are > + * expected to call pcmcia_disable_device() instead. > + */ > int pcmcia_release_configuration(struct pcmcia_device *p_dev) > { > pccard_io_map io = { 0, 0, 0, 0, 1 }; > @@ -346,16 +369,17 @@ int pcmcia_release_configuration(struct pcmcia_device > *p_dev) > mutex_unlock(&s->ops_mutex); > > return 0; > -} /* pcmcia_release_configuration */ > +} > > > -/** pcmcia_release_io > +/** > + * pcmcia_release_io() - release I/O allocated by a PCMCIA device ditto > * > - * Release_io() releases the I/O ranges allocated by a client. This > - * may be invoked some time after a card ejection has already dumped > - * the actual socket configuration, so if the client is "stale", we > - * don't bother checking the port ranges against the current socket > - * values. > + * pcmcia_release_io() releases the I/O ranges allocated by a PCMCIA > + * device. This may be invoked some time after a card ejection has > + * already dumped the actual socket configuration, so if the client is > + * "stale", we don't bother checking the port ranges against the > + * current socket values. > */ > static int pcmcia_release_io(struct pcmcia_device *p_dev) > { > @@ -383,10 +407,11 @@ out: > return ret; > } /* pcmcia_release_io */ > > + > /** > * pcmcia_release_window() - release reserved iomem for PCMCIA devices ditto > * > - * pcmcia_release_window() releases struct resource *res which was > + * pcmcia_release_window() releases &struct resource *res which was > * previously reserved by calling pcmcia_request_window(). > */ > int pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res) > @@ -431,9 +456,16 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, > struct resource *res) > } /* pcmcia_release_window */ > EXPORT_SYMBOL(pcmcia_release_window); > > + > /** > * pcmcia_enable_device() - set up and activate a PCMCIA device > + * @p_dev - the associated PCMCIA device > + * @flags - configuration
Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Dear Komuro, On Fri, Sep 17, 2010 at 10:06:51PM +0900, Komuro wrote: > Xircom multi-function card still does not work. Huh, that is indeed surprising, as the dmesg has all the usual config descriptions: eth0: Xircom: port 0x300, irq 18, hwaddr 00:10:a4:f3:db:02 ... 0.1: ttyS3 at I/O 0x2e8 (irq = 18) is a 16550A Are these lines different from what you see on a working kernel? Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Xircom multi-function card still does not work. Please see the attached dmesg log. Best Regards Komuro - Original Message - >Date: Mon, 13 Sep 2010 21:53:53 +0200 >From: Dominik Brodowski >To: Komuro >Cc: linux-pcmcia@lists.infradead.org, linux-ser...@vger.kernel.org >Subject: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when > calling pcmcia_request_io() > > >Dear Komuro, > >does the attached patch help with 2.6.36-rc4? > >Best, > Dominik > >commit 1852d6b8c3fa2d1765f66cd7d96a8c6bf9f01997 >Author: Dominik Brodowski >Date: Mon Aug 30 08:18:54 2010 +0200 > >pcmcia serial_cs.c: fix multifunction card handling > >We shouldn't overwrite pre-set values, and we should also >set the port address to the beginning, and not the end of >the 8-port range. > >Reported-by: Komuro >Signed-off-by: Dominik Brodowski > >diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c >index 141c695..7d475b2 100644 >--- a/drivers/serial/serial_cs.c >+++ b/drivers/serial/serial_cs.c >@@ -335,8 +335,6 @@ static int serial_probe(struct pcmcia_device *link) > info->p_dev = link; > link->priv = info; > >- link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; >- link->resource[0]->end = 8; > link->conf.Attributes = CONF_ENABLE_IRQ; > if (do_sound) { > link->conf.Attributes |= CONF_ENABLE_SPKR; >@@ -411,6 +409,27 @@ static int setup_serial(struct pcmcia_device *handle, st ruct serial_info * info, > > /**/ > >+static int pfc_config(struct pcmcia_device *p_dev) >+{ >+ unsigned int port = 0; >+ struct serial_info *info = p_dev->priv; >+ >+ if ((p_dev->resource[1]->end != 0) && >+ (resource_size(p_dev->resource[1]) == 8)) { >+ port = p_dev->resource[1]->start; >+ info->slave = 1; >+ } else if ((info->manfid == MANFID_OSITECH) && >+ (resource_size(p_dev->resource[0]) == 0x40)) { >+ port = p_dev->resource[0]->start + 0x28; >+ info->slave = 1; >+ } >+ if (info->slave) >+ return setup_serial(p_dev, info, port, p_dev->irq); >+ >+ dev_warn(&p_dev->dev, "no usable port range found, giving up\n"); >+ return -ENODEV; >+} >+ > static int simple_config_check(struct pcmcia_device *p_dev, > cistpl_cftable_entry_t *cf, > cistpl_cftable_entry_t *dflt, >@@ -461,23 +480,8 @@ static int simple_config(struct pcmcia_device *link) > struct serial_info *info = link->priv; > int i = -ENODEV, try; > >- /* If the card is already configured, look up the port and irq */ >- if (link->function_config) { >- unsigned int port = 0; >- if ((link->resource[1]->end != 0) && >- (resource_size(link->resource[1]) == 8)) { >- port = link->resource[1]->end; >- info->slave = 1; >- } else if ((info->manfid == MANFID_OSITECH) && >- (resource_size(link->resource[0]) == 0x40)) { >- port = link->resource[0]->start + 0x28; >- info->slave = 1; >- } >- if (info->slave) { >- return setup_serial(link, info, port, >- link->irq); >- } >- } >+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; >+ link->resource[0]->end = 8; > > /* First pass: look for a config entry that looks normal. >* Two tries: without IO aliases, then with aliases */ >@@ -491,8 +495,7 @@ static int simple_config(struct pcmcia_device *link) > if (!pcmcia_loop_config(link, simple_config_check_notpicky, NULL)) > goto found_port; > >- printk(KERN_NOTICE >- "serial_cs: no usable port range found, giving up\n"); >+ dev_warn(&link->dev, "no usable port range found, giving up\n"); > return -1; > > found_port: >@@ -558,6 +561,7 @@ static int multi_config(struct pcmcia_device *link) > int i, base2 = 0; > > /* First, look for a generic full-sized window */ >+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; > link->resource[0]->end = info->multi * 8; > if (pcmcia_loop_config(link, multi_config_check, &base2)) { > /* If that didn't work, look for two windows */ >@@ -565,15 +569,14 @@ static int multi_config(struct pcmcia_device *link) > info->multi = 2; > if (pcmcia_loop_config(link, multi_config_check_notpicky, > &base2)) { >- printk(KERN_NOTICE "serial_cs: no usable port range" >+ dev_warn(&link->dev, "no usable port range " > "found, giving up\n"); > return -ENODEV; > } >