* [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
[not found] <20091024194219.GA19546@comet.dominikbrodowski.net>
@ 2009-10-24 19:43 ` Dominik Brodowski
2009-10-26 6:42 ` Artem Bityutskiy
0 siblings, 1 reply; 16+ messages in thread
From: Dominik Brodowski @ 2009-10-24 19:43 UTC (permalink / raw)
To: linux-pcmcia; +Cc: linux-usb, linux-mtd, Dominik Brodowski
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.
Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.
CC: linux-mtd@lists.infradead.org
CC: linux-usb@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
drivers/mtd/maps/pcmciamtd.c | 14 +----------
drivers/parport/parport_cs.c | 37 +++++++++++--------------------
drivers/telephony/ixj_pcmcia.c | 36 +++++++++++--------------------
drivers/usb/host/sl811_cs.c | 46 +++++++++++----------------------------
4 files changed, 41 insertions(+), 92 deletions(-)
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 52c07f2..fa00919 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -119,10 +119,8 @@ static caddr_t remap_window(struct map_info *map, unsigned long to)
dev->offset, mrq.CardOffset);
mrq.Page = 0;
ret = pcmcia_map_mem_page(win, &mrq);
- if (ret != 0) {
- cs_error(dev->p_dev, MapMemPage, ret);
+ if (ret != 0)
return NULL;
- }
dev->offset = mrq.CardOffset;
}
return dev->win_base + (to & (dev->win_size-1));
@@ -327,8 +325,6 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on)
DEBUG(2, "dev = %p on = %d vpp = %d\n", dev, on, dev->vpp);
ret = pcmcia_modify_configuration(link, &mod);
- if (ret != 0)
- cs_error(link, ModifyConfiguration, ret);
}
@@ -488,16 +484,12 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *link,
* MTD device available to the system.
*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static int pcmciamtd_config(struct pcmcia_device *link)
{
struct pcmciamtd_dev *dev = link->priv;
struct mtd_info *mtd = NULL;
cs_status_t status;
win_req_t req;
- int last_ret = 0, last_fn = 0;
int ret;
int i;
static char *probes[] = { "jedec_probe", "cfi_probe" };
@@ -584,7 +576,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
DEBUG(2, "Setting Configuration");
ret = pcmcia_request_configuration(link, &link->conf);
if (ret != 0) {
- cs_error(link, RequestConfiguration, ret);
if (dev->win_base) {
iounmap(dev->win_base);
dev->win_base = NULL;
@@ -659,8 +650,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
link->dev_node = &dev->node;
return 0;
- cs_failed:
- cs_error(link, last_fn, last_ret);
+ failed:
err("CS Error, exiting");
pcmciamtd_release(link);
return -ENODEV;
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index 8fdfa4f..e56a4de 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -67,14 +67,6 @@ MODULE_LICENSE("Dual MPL/GPL");
INT_MODULE_PARM(epp_mode, 1);
-#ifdef PCMCIA_DEBUG
-INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"parport_cs.c 1.29 2002/10/11 06:57:41 (David Hinds)";
-#else
-#define DEBUG(n, args...)
-#endif
/*====================================================================*/
@@ -103,7 +95,7 @@ static int parport_probe(struct pcmcia_device *link)
{
parport_info_t *info;
- DEBUG(0, "parport_attach()\n");
+ dev_dbg(&link->dev, "parport_attach()\n");
/* Create new parport device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
@@ -132,7 +124,7 @@ static int parport_probe(struct pcmcia_device *link)
static void parport_detach(struct pcmcia_device *link)
{
- DEBUG(0, "parport_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "parport_detach\n");
parport_cs_release(link);
@@ -147,9 +139,6 @@ static void parport_detach(struct pcmcia_device *link)
======================================================================*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static int parport_config_check(struct pcmcia_device *p_dev,
cistpl_cftable_entry_t *cfg,
cistpl_cftable_entry_t *dflt,
@@ -178,18 +167,20 @@ static int parport_config(struct pcmcia_device *link)
{
parport_info_t *info = link->priv;
struct parport *p;
- int last_ret, last_fn;
+ int ret;
- DEBUG(0, "parport_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "parport_config\n");
- last_ret = pcmcia_loop_config(link, parport_config_check, NULL);
- if (last_ret) {
- cs_error(link, RequestIO, last_ret);
+ ret = pcmcia_loop_config(link, parport_config_check, NULL);
+ if (ret)
goto failed;
- }
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
- CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2,
link->irq.AssignedIRQ, PARPORT_DMA_NONE,
@@ -213,8 +204,6 @@ static int parport_config(struct pcmcia_device *link)
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
parport_cs_release(link);
return -ENODEV;
@@ -232,7 +221,7 @@ static void parport_cs_release(struct pcmcia_device *link)
{
parport_info_t *info = link->priv;
- DEBUG(0, "parport_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "parport_release\n");
if (info->ndev) {
struct parport *p = info->port;
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c
index 347c3ed..86f2767 100644
--- a/drivers/telephony/ixj_pcmcia.c
+++ b/drivers/telephony/ixj_pcmcia.c
@@ -19,13 +19,6 @@
* PCMCIA service support for Quicknet cards
*/
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0644);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-#else
-#define DEBUG(n, args...)
-#endif
typedef struct ixj_info_t {
int ndev;
@@ -39,7 +32,7 @@ static void ixj_cs_release(struct pcmcia_device * link);
static int ixj_probe(struct pcmcia_device *p_dev)
{
- DEBUG(0, "ixj_attach()\n");
+ dev_dbg(&link->dev, "ixj_attach()\n");
/* Create new ixj device */
p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
p_dev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
@@ -55,33 +48,30 @@ static int ixj_probe(struct pcmcia_device *p_dev)
static void ixj_detach(struct pcmcia_device *link)
{
- DEBUG(0, "ixj_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "ixj_detach\n");
ixj_cs_release(link);
kfree(link->priv);
}
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
{
char *str;
int i, place;
- DEBUG(0, "ixj_get_serial(0x%p)\n", link);
+ dev_dbg(&link->dev, "ixj_get_serial\n");
str = link->prod_id[0];
if (!str)
- goto cs_failed;
+ goto failed;
printk("%s", str);
str = link->prod_id[1];
if (!str)
- goto cs_failed;
+ goto failed;
printk(" %s", str);
str = link->prod_id[2];
if (!str)
- goto cs_failed;
+ goto failed;
place = 1;
for (i = strlen(str) - 1; i >= 0; i--) {
switch (str[i]) {
@@ -118,9 +108,9 @@ static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
}
str = link->prod_id[3];
if (!str)
- goto cs_failed;
+ goto failed;
printk(" version %s\n", str);
- cs_failed:
+ failed:
return;
}
@@ -151,13 +141,13 @@ static int ixj_config(struct pcmcia_device * link)
cistpl_cftable_entry_t dflt = { 0 };
info = link->priv;
- DEBUG(0, "ixj_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "ixj_config\n");
if (pcmcia_loop_config(link, ixj_config_check, &dflt))
- goto cs_failed;
+ goto failed;
if (pcmcia_request_configuration(link, &link->conf))
- goto cs_failed;
+ goto failed;
/*
* Register the card with the core.
@@ -170,7 +160,7 @@ static int ixj_config(struct pcmcia_device * link)
ixj_get_serial(link, j);
return 0;
- cs_failed:
+ failed:
ixj_cs_release(link);
return -ENODEV;
}
@@ -178,7 +168,7 @@ static int ixj_config(struct pcmcia_device * link)
static void ixj_cs_release(struct pcmcia_device *link)
{
ixj_info_t *info = link->priv;
- DEBUG(0, "ixj_cs_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "ixj_cs_release\n");
info->ndev = 0;
pcmcia_disable_device(link);
}
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 516848d..4607742 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -37,28 +37,8 @@ MODULE_LICENSE("GPL");
/* MACROS */
/*====================================================================*/
-#if defined(DEBUG) || defined(PCMCIA_DEBUG)
-
-static int pc_debug = 0;
-module_param(pc_debug, int, 0644);
-
-#define DBG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG "sl811_cs: " args)
-
-#else
-#define DBG(n, args...) do{}while(0)
-#endif /* no debugging */
-
#define INFO(args...) printk(KERN_INFO "sl811_cs: " args)
-#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0444)
-
-#define CS_CHECK(fn, ret) \
- do { \
- last_fn = (fn); \
- if ((last_ret = (ret)) != 0) \
- goto cs_failed; \
- } while (0)
-
/*====================================================================*/
/* VARIABLES */
/*====================================================================*/
@@ -76,7 +56,7 @@ static void sl811_cs_release(struct pcmcia_device * link);
static void release_platform_dev(struct device * dev)
{
- DBG(0, "sl811_cs platform_dev release\n");
+ dev_dbg(dev, "sl811_cs platform_dev release\n");
dev->parent = NULL;
}
@@ -140,7 +120,7 @@ static int sl811_hc_init(struct device *parent, resource_size_t base_addr,
static void sl811_cs_detach(struct pcmcia_device *link)
{
- DBG(0, "sl811_cs_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "sl811_cs_detach\n");
sl811_cs_release(link);
@@ -150,7 +130,7 @@ static void sl811_cs_detach(struct pcmcia_device *link)
static void sl811_cs_release(struct pcmcia_device * link)
{
- DBG(0, "sl811_cs_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "sl811_cs_release\n");
pcmcia_disable_device(link);
platform_device_unregister(&platform_dev);
@@ -207,9 +187,9 @@ static int sl811_cs_config(struct pcmcia_device *link)
{
struct device *parent = &handle_to_dev(link);
local_info_t *dev = link->priv;
- int last_fn, last_ret;
+ int ret;
- DBG(0, "sl811_cs_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "sl811_cs_config\n");
if (pcmcia_loop_config(link, sl811_cs_config_check, NULL))
goto failed;
@@ -217,14 +197,16 @@ static int sl811_cs_config(struct pcmcia_device *link)
/* require an IRQ and two registers */
if (!link->io.NumPorts1 || link->io.NumPorts1 < 2)
goto failed;
- if (link->conf.Attributes & CONF_ENABLE_IRQ)
- CS_CHECK(RequestIRQ,
- pcmcia_request_irq(link, &link->irq));
- else
+ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
+ } else
goto failed;
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
sprintf(dev->node.dev_name, driver_name);
dev->node.major = dev->node.minor = 0;
@@ -241,8 +223,6 @@ static int sl811_cs_config(struct pcmcia_device *link)
if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ)
< 0) {
-cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
printk(KERN_WARNING "sl811_cs_config failed\n");
sl811_cs_release(link);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-24 19:43 ` [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers) Dominik Brodowski
@ 2009-10-26 6:42 ` Artem Bityutskiy
2009-10-26 7:13 ` Dominik Brodowski
0 siblings, 1 reply; 16+ messages in thread
From: Artem Bityutskiy @ 2009-10-26 6:42 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: linux-pcmcia, linux-mtd, linux-usb
On Sat, 2009-10-24 at 21:43 +0200, Dominik Brodowski wrote:
> Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
> requiring manual settings of PCMCIA_DEBUG.
>
> Also, remove all usages of the CS_CHECK macro and replace them with proper
> Linux style calling and return value checking. The extra error reporting may
> be dropped, as the PCMCIA core already complains about any (non-driver-author)
> errors.
>
> CC: linux-mtd@lists.infradead.org
> CC: linux-usb@vger.kernel.org
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Have you been able to test the driver after the clean-up?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 6:42 ` Artem Bityutskiy
@ 2009-10-26 7:13 ` Dominik Brodowski
2009-10-26 7:26 ` Artem Bityutskiy
0 siblings, 1 reply; 16+ messages in thread
From: Dominik Brodowski @ 2009-10-26 7:13 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: linux-pcmcia, linux-mtd, linux-usb
Hey,
On Mon, Oct 26, 2009 at 08:42:11AM +0200, Artem Bityutskiy wrote:
> On Sat, 2009-10-24 at 21:43 +0200, Dominik Brodowski wrote:
> > Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
> > requiring manual settings of PCMCIA_DEBUG.
> >
> > Also, remove all usages of the CS_CHECK macro and replace them with proper
> > Linux style calling and return value checking. The extra error reporting may
> > be dropped, as the PCMCIA core already complains about any (non-driver-author)
> > errors.
> >
> > CC: linux-mtd@lists.infradead.org
> > CC: linux-usb@vger.kernel.org
> > Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
>
> Have you been able to test the driver after the clean-up?
No, I don't have all that much PCMCIA hardware -- and specifically none for
the drivers which were modified in this patch (parport, ixj-telephony,
sl811; pcmcia_mtd is marked broken anyway).
Best,
Dominik
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 7:13 ` Dominik Brodowski
@ 2009-10-26 7:26 ` Artem Bityutskiy
2009-10-26 7:56 ` Dominik Brodowski
2009-10-26 10:19 ` Alan Cox
0 siblings, 2 replies; 16+ messages in thread
From: Artem Bityutskiy @ 2009-10-26 7:26 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: linux-pcmcia, linux-mtd, linux-usb
On Mon, 2009-10-26 at 08:13 +0100, Dominik Brodowski wrote:
> Hey,
>
> On Mon, Oct 26, 2009 at 08:42:11AM +0200, Artem Bityutskiy wrote:
> > On Sat, 2009-10-24 at 21:43 +0200, Dominik Brodowski wrote:
> > > Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
> > > requiring manual settings of PCMCIA_DEBUG.
> > >
> > > Also, remove all usages of the CS_CHECK macro and replace them with proper
> > > Linux style calling and return value checking. The extra error reporting may
> > > be dropped, as the PCMCIA core already complains about any (non-driver-author)
> > > errors.
> > >
> > > CC: linux-mtd@lists.infradead.org
> > > CC: linux-usb@vger.kernel.org
> > > Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
> >
> > Have you been able to test the driver after the clean-up?
>
> No, I don't have all that much PCMCIA hardware -- and specifically none for
> the drivers which were modified in this patch (parport, ixj-telephony,
> sl811; pcmcia_mtd is marked broken anyway).
This driver is old and ugly, and it is even possible that no one uses it
anymore, so I guess getting clean-ups without testing is ok for it.
However, in that case the clean-up patches should be reviewable, which I
wouldn't say about your patch :-)
Could you please split it on several smaller patches, each doing one
thing only?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 7:26 ` Artem Bityutskiy
@ 2009-10-26 7:56 ` Dominik Brodowski
2009-10-26 8:05 ` Artem Bityutskiy
2009-10-26 10:19 ` Alan Cox
1 sibling, 1 reply; 16+ messages in thread
From: Dominik Brodowski @ 2009-10-26 7:56 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: linux-pcmcia, linux-mtd, linux-usb
On Mon, Oct 26, 2009 at 09:26:31AM +0200, Artem Bityutskiy wrote:
> > No, I don't have all that much PCMCIA hardware -- and specifically none for
> > the drivers which were modified in this patch (parport, ixj-telephony,
> > sl811; pcmcia_mtd is marked broken anyway).
>
> This driver is old and ugly, and it is even possible that no one uses it
> anymore, so I guess getting clean-ups without testing is ok for it.
Which one are you referring to specifically?
> However, in that case the clean-up patches should be reviewable, which I
> wouldn't say about your patch :-)
It are "only" 46 line changes max per driver?
> Could you please split it on several smaller patches, each doing one
> thing only?
Well, I could split up the -- related -- CS_CHECK() and dev_dbg() parts if
_really_ necessary.
Best,
Dominik
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 7:56 ` Dominik Brodowski
@ 2009-10-26 8:05 ` Artem Bityutskiy
0 siblings, 0 replies; 16+ messages in thread
From: Artem Bityutskiy @ 2009-10-26 8:05 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: linux-pcmcia, linux-mtd, linux-usb
On Mon, 2009-10-26 at 08:56 +0100, Dominik Brodowski wrote:
> On Mon, Oct 26, 2009 at 09:26:31AM +0200, Artem Bityutskiy wrote:
> > > No, I don't have all that much PCMCIA hardware -- and specifically none for
> > > the drivers which were modified in this patch (parport, ixj-telephony,
> > > sl811; pcmcia_mtd is marked broken anyway).
> >
> > This driver is old and ugly, and it is even possible that no one uses it
> > anymore, so I guess getting clean-ups without testing is ok for it.
>
> Which one are you referring to specifically?
Actually I referred to pcmciamtd. I was confused a little, sorry.
> > However, in that case the clean-up patches should be reviewable, which I
> > wouldn't say about your patch :-)
>
> It are "only" 46 line changes max per driver?
>
> > Could you please split it on several smaller patches, each doing one
> > thing only?
>
> Well, I could split up the -- related -- CS_CHECK() and dev_dbg() parts if
> _really_ necessary.
I cannot comment about "_really_", this is just what I personally think
would be a good idea, up to you.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 10:19 ` Alan Cox
@ 2009-10-26 10:18 ` Artem Bityutskiy
2009-11-03 8:37 ` Artem Bityutskiy
2009-11-04 10:20 ` PETEC 2MB SRAM Pep Talens
0 siblings, 2 replies; 16+ messages in thread
From: Artem Bityutskiy @ 2009-10-26 10:18 UTC (permalink / raw)
To: Alan Cox, 'David Woodhouse'
Cc: linux-pcmcia, linux-mtd, linux-usb, Dominik Brodowski
On Mon, 2009-10-26 at 10:19 +0000, Alan Cox wrote:
> > > No, I don't have all that much PCMCIA hardware -- and specifically none for
> > > the drivers which were modified in this patch (parport, ixj-telephony,
> > > sl811; pcmcia_mtd is marked broken anyway).
> >
> > This driver is old and ugly, and it is even possible that no one uses it
> > anymore, so I guess getting clean-ups without testing is ok for it.
> > However, in that case the clean-up patches should be reviewable, which I
> > wouldn't say about your patch :-)
> >
> > Could you please split it on several smaller patches, each doing one
> > thing only?
>
> pcmcia_mtd has been marked broken for how long - better to delete it ?
> It's in the git history if anyone ever wants to resurrect it.
I do not have objections. David?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 7:26 ` Artem Bityutskiy
2009-10-26 7:56 ` Dominik Brodowski
@ 2009-10-26 10:19 ` Alan Cox
2009-10-26 10:18 ` Artem Bityutskiy
1 sibling, 1 reply; 16+ messages in thread
From: Alan Cox @ 2009-10-26 10:19 UTC (permalink / raw)
To: dedekind1; +Cc: linux-pcmcia, linux-mtd, linux-usb, Dominik Brodowski
> > No, I don't have all that much PCMCIA hardware -- and specifically none for
> > the drivers which were modified in this patch (parport, ixj-telephony,
> > sl811; pcmcia_mtd is marked broken anyway).
>
> This driver is old and ugly, and it is even possible that no one uses it
> anymore, so I guess getting clean-ups without testing is ok for it.
> However, in that case the clean-up patches should be reviewable, which I
> wouldn't say about your patch :-)
>
> Could you please split it on several smaller patches, each doing one
> thing only?
pcmcia_mtd has been marked broken for how long - better to delete it ?
It's in the git history if anyone ever wants to resurrect it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
2009-10-26 10:18 ` Artem Bityutskiy
@ 2009-11-03 8:37 ` Artem Bityutskiy
2009-11-07 11:19 ` pcmciamtd -- what's broken, who needs it? Dominik Brodowski
2009-11-04 10:20 ` PETEC 2MB SRAM Pep Talens
1 sibling, 1 reply; 16+ messages in thread
From: Artem Bityutskiy @ 2009-11-03 8:37 UTC (permalink / raw)
To: Alan Cox
Cc: linux-mtd, linux-pcmcia, 'David Woodhouse', linux-usb,
Dominik Brodowski
On Mon, 2009-10-26 at 12:18 +0200, Artem Bityutskiy wrote:
> On Mon, 2009-10-26 at 10:19 +0000, Alan Cox wrote:
> > > > No, I don't have all that much PCMCIA hardware -- and specifically none for
> > > > the drivers which were modified in this patch (parport, ixj-telephony,
> > > > sl811; pcmcia_mtd is marked broken anyway).
> > >
> > > This driver is old and ugly, and it is even possible that no one uses it
> > > anymore, so I guess getting clean-ups without testing is ok for it.
> > > However, in that case the clean-up patches should be reviewable, which I
> > > wouldn't say about your patch :-)
> > >
> > > Could you please split it on several smaller patches, each doing one
> > > thing only?
> >
> > pcmcia_mtd has been marked broken for how long - better to delete it ?
> > It's in the git history if anyone ever wants to resurrect it.
>
> I do not have objections. David?
I suggest to interpret the silence as "ok", go ahead and remove it.
Dominik, do you care enough to send a patch?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 16+ messages in thread
* PETEC 2MB SRAM
@ 2009-11-04 10:20 ` Pep Talens
0 siblings, 0 replies; 16+ messages in thread
From: Pep Talens @ 2009-11-04 10:20 UTC (permalink / raw)
To: linux-pcmcia; +Cc: linux-mtd
Hi,
this is my scenario:
Laptop: BenQ Joybook A33E
OS: OpenSuse 10.2
Kernel: 2.6.18.8-0.13-default
PCMCIA Card: PRETEC 2MB SRAM
http://pan8.fotovista.com/dev/8/6/03573268/l_03573268.jpg
pcmcia-cs version: 3.2.8
Socket: yenta-socket
IRQ: 169
After reading the Howto, mini-howto and some other stuff I still trying to
figure out how to mount it and write in. Sorry if redundant but I'm a little
lost. I can provide the output of some commands:
Monk:/opt/pcmcia-cs-3.2.8/cardmgr #
udevinfo -a -p /sys/bus/pcmcia/devices/0.0
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1e.0/0000:01:02.0/0.0':
KERNEL=="0.0"
SUBSYSTEM=="pcmcia"
DRIVER==""
ATTR{modalias}=="pcmcia:m0000c0000f00fn00pfn00paEBF91155pb805360CApc00000000pd00000000"
ATTR{prod_id2}==" 2MB SRAM CARD"
ATTR{prod_id1}=="PRETEC"
ATTR{pm_state}=="on"
ATTR{function}=="0x00"
looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:01:02.0':
KERNELS=="0000:01:02.0"
SUBSYSTEMS=="pci"
DRIVERS=="yenta_cardbus"
ATTRS{broken_parity_status}=="0"
ATTRS{enable}=="1"
ATTRS{modalias}=="pci:v0000104Cd00008031sv00001071sd00008048bc06sc07i00"
ATTRS{local_cpus}=="ffffffff"
ATTRS{irq}=="169"
ATTRS{class}=="0x060700"
ATTRS{subsystem_device}=="0x8048"
ATTRS{subsystem_vendor}=="0x1071"
ATTRS{device}=="0x8031"
ATTRS{vendor}=="0x104c"
looking at parent device '/devices/pci0000:00/0000:00:1e.0':
KERNELS=="0000:00:1e.0"
SUBSYSTEMS=="pci"
DRIVERS==""
ATTRS{broken_parity_status}=="0"
ATTRS{enable}=="1"
ATTRS{modalias}=="pci:v00008086d00002448sv00000000sd00000000bc06sc04i01"
ATTRS{local_cpus}=="ffffffff"
ATTRS{irq}=="0"
ATTRS{class}=="0x060401"
ATTRS{subsystem_device}=="0x0000"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{device}=="0x2448"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Monk:/opt/pcmcia-cs-3.2.8/cardmgr # cat /proc/interrupts
CPU0
0: 3803200 IO-APIC-edge timer
1: 44 IO-APIC-edge i8042
8: 2 IO-APIC-edge rtc
9: 22488 IO-APIC-level acpi
12: 1044 IO-APIC-edge i8042
14: 559838 IO-APIC-edge libata
15: 168263 IO-APIC-edge libata
169: 6 IO-APIC-level yenta
177: 3 IO-APIC-level uhci_hcd:usb2, ohci1394
193: 149076 IO-APIC-level uhci_hcd:usb1, ehci_hcd:usb4
201: 0 IO-APIC-level uhci_hcd:usb3
209: 865 IO-APIC-level HDA Intel
217: 3688954 IO-APIC-level eth0
NMI: 0
LOC: 3820527
ERR: 0
MIS: 0
Monk:/proc/bus/pccard # cardctl config
Socket 0:
Vcc 5.0V Vpp1 5.0V Vpp2 5.0V
Monk:/proc/bus/pccard # cardctl ident
Socket 0:
product info: "PRETEC", " 2MB SRAM CARD", "", ""
But I guess that this card is not supported in /etc/pcmcia/config. More over,
I can see this in /var/log/messages:
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: IO ports
0x100-0x3af: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: IO ports
0x3e0-0x4ff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: IO ports
0x820-0x8ff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: IO ports
0xc00-0xcf7: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: memory
0xc0000-0xfffff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: memory
0xa0000000-0xa0ffffff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: memory
0x60000000-0x60ffffff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5688]: could not adjust resource: IO ports
0xa00-0xaff: Function not implemented
Oct 29 09:11:47 Monk cardmgr[5689]: unsupported card in socket 0
Oct 29 09:11:47 Monk cardmgr[5689]: product info: "PRETEC", " 2MB SRAM
CARD", "", ""
After see this, as you will guess, my config.opts is:
include port 0x100-0x3af
include port 0x3e0-0x4ff
include port 0x820-0x8ff
include port 0xc00-0xcf7
include memory 0xc0000-0xfffff
include memory 0xa0000000-0xa0ffffff
include memory 0x60000000-0x60ffffff
Now I'm trying to migrate from cardmgr to pcmciautils but I don't know if
after migration I'll be able to make this card writable. Am I in the right
way? Could someone guide me?
Thank you very much
--
Pep Talens
Wincor-Nixdorf
46022 Valencia (Spain)
Tel. +34 902 15 38 27 Ext. 117
pep.talens@f1-connecting.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* pcmciamtd -- what's broken, who needs it?
2009-11-03 8:37 ` Artem Bityutskiy
@ 2009-11-07 11:19 ` Dominik Brodowski
2009-11-07 11:29 ` Komuro
2009-11-07 22:33 ` Komuro
0 siblings, 2 replies; 16+ messages in thread
From: Dominik Brodowski @ 2009-11-07 11:19 UTC (permalink / raw)
To: Artem Bityutskiy, Pep Talens
Cc: 'David Woodhouse', linux-pcmcia, linux-mtd, Alan Cox
Hey,
it seems that just as we were preparing to move pcmciamtd to staging, an
user who still tries to use it has appeared:
> ATTR{modalias}=="pcmcia:m0000c0000f00fn00pfn00paEBF91155pb805360CApc00000000pd00000000"
> ATTR{prod_id2}==" 2MB SRAM CARD"
> ATTR{prod_id1}=="PRETEC"
> ATTR{pm_state}=="on"
> ATTR{function}=="0x00"
So, what is actually BROKEN with pcmciamtd.c ?
Best,
Dominik
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pcmciamtd -- what's broken, who needs it?
2009-11-07 11:19 ` pcmciamtd -- what's broken, who needs it? Dominik Brodowski
@ 2009-11-07 11:29 ` Komuro
2009-11-07 11:33 ` Dominik Brodowski
2009-11-07 22:33 ` Komuro
1 sibling, 1 reply; 16+ messages in thread
From: Komuro @ 2009-11-07 11:29 UTC (permalink / raw)
To: Dominik Brodowski
Cc: Artem Bityutskiy, Pep Talens, linux-pcmcia, linux-mtd,
'David Woodhouse', Alan Cox
Hi,
staging directory is not the place for broken driver,
is it?
>Hey,
>
>it seems that just as we were preparing to move pcmciamtd to staging, an
>user who still tries to use it has appeared:
>
>> ATTR{modalias}=="pcmcia:m0000c0000f00fn00pfn00paEBF91155pb805360CApc0000000
0pd00000000"
>> ? ? ATTR{prod_id2}==" ?2MB SRAM CARD"
>> ? ? ATTR{prod_id1}=="PRETEC"
>> ? ? ATTR{pm_state}=="on"
>> ? ? ATTR{function}=="0x00"
>
>So, what is actually BROKEN with pcmciamtd.c ?
Best Regards
Komuro
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pcmciamtd -- what's broken, who needs it?
2009-11-07 11:29 ` Komuro
@ 2009-11-07 11:33 ` Dominik Brodowski
2009-11-07 16:57 ` Kristoffer Ericson
0 siblings, 1 reply; 16+ messages in thread
From: Dominik Brodowski @ 2009-11-07 11:33 UTC (permalink / raw)
To: Komuro
Cc: Artem Bityutskiy, Pep Talens, linux-pcmcia, linux-mtd,
'David Woodhouse', Alan Cox
Hey,
On Sat, Nov 07, 2009 at 08:29:09PM +0900, Komuro wrote:
> staging directory is not the place for broken driver,
> is it?
It is becoming the place for drivers on their way out of the kernel tree.
An indication for drivers being unused is that they have been marked broken
or obsolete for a loooong time; and then they'll remain in staging for 3
releases or so before being removed (or being moved in again).
Best,
Dominik
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pcmciamtd -- what's broken, who needs it?
2009-11-07 11:33 ` Dominik Brodowski
@ 2009-11-07 16:57 ` Kristoffer Ericson
2009-11-08 8:12 ` Dominik Brodowski
0 siblings, 1 reply; 16+ messages in thread
From: Kristoffer Ericson @ 2009-11-07 16:57 UTC (permalink / raw)
To: Dominik Brodowski
Cc: Komuro, Artem Bityutskiy, Pep Talens, linux-pcmcia, linux-mtd,
'David Woodhouse', Alan Cox
On Sat, 7 Nov 2009 12:33:46 +0100
Dominik Brodowski <linux@dominikbrodowski.net> wrote:
> Hey,
>
> On Sat, Nov 07, 2009 at 08:29:09PM +0900, Komuro wrote:
> > staging directory is not the place for broken driver,
> > is it?
>
>
> It is becoming the place for drivers on their way out of the kernel tree.
> An indication for drivers being unused is that they have been marked broken
> or obsolete for a loooong time; and then they'll remain in staging for 3
> releases or so before being removed (or being moved in again).
Is the 3 releases a fixed date? Got a couple of drivers in there
that I "might" want to use in the near future. Just havent had time to
looking at cleaning them up.
>
> Best,
> Dominik
>
> _______________________________________________
> Linux PCMCIA reimplementation list
> http://lists.infradead.org/mailman/listinfo/linux-pcmcia
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pcmciamtd -- what's broken, who needs it?
2009-11-07 11:19 ` pcmciamtd -- what's broken, who needs it? Dominik Brodowski
2009-11-07 11:29 ` Komuro
@ 2009-11-07 22:33 ` Komuro
1 sibling, 0 replies; 16+ messages in thread
From: Komuro @ 2009-11-07 22:33 UTC (permalink / raw)
To: Dominik Brodowski
Cc: Artem Bityutskiy, Pep Talens, linux-pcmcia, linux-mtd,
'David Woodhouse', Alan Cox
Hi,
At least, we need to add one line below to pcmciamtd.c .
PCMCIA_DEVICE_PROD_ID12("PRETEC", " 2MB SRAM CARD", 0xebf91155, 0x805360ca
),
>Hey,
>
>it seems that just as we were preparing to move pcmciamtd to staging, an
>user who still tries to use it has appeared:
>
>> ATTR{modalias}=="pcmcia:m0000c0000f00fn00pfn00paEBF91155pb805360CApc0000000
0pd00000000"
>> ? ? ATTR{prod_id2}==" ?2MB SRAM CARD"
>> ? ? ATTR{prod_id1}=="PRETEC"
>> ? ? ATTR{pm_state}=="on"
>> ? ? ATTR{function}=="0x00"
>
>So, what is actually BROKEN with pcmciamtd.c ?
>
>Best,
> Dominik
>
>_______________________________________________
>Linux PCMCIA reimplementation list
>http://lists.infradead.org/mailman/listinfo/linux-pcmcia
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pcmciamtd -- what's broken, who needs it?
2009-11-07 16:57 ` Kristoffer Ericson
@ 2009-11-08 8:12 ` Dominik Brodowski
0 siblings, 0 replies; 16+ messages in thread
From: Dominik Brodowski @ 2009-11-08 8:12 UTC (permalink / raw)
To: Kristoffer Ericson, gregkh
Cc: Komuro, Artem Bityutskiy, Pep Talens, linux-pcmcia, linux-mtd,
'David Woodhouse', Alan Cox
Hey,
On Sat, Nov 07, 2009 at 05:57:51PM +0100, Kristoffer Ericson wrote:
> On Sat, 7 Nov 2009 12:33:46 +0100
> Dominik Brodowski <linux@dominikbrodowski.net> wrote:
> > On Sat, Nov 07, 2009 at 08:29:09PM +0900, Komuro wrote:
> > > staging directory is not the place for broken driver,
> > > is it?
> >
> >
> > It is becoming the place for drivers on their way out of the kernel tree.
> > An indication for drivers being unused is that they have been marked broken
> > or obsolete for a loooong time; and then they'll remain in staging for 3
> > releases or so before being removed (or being moved in again).
>
> Is the 3 releases a fixed date? Got a couple of drivers in there
> that I "might" want to use in the near future. Just havent had time to
> looking at cleaning them up.
IIRC it's 3 releases of inaction before there's the intention to remove the
drivers. But for the details of these rules (which probably aren't black and
white) you should ask the maintainer of linux-staging :)
Best,
Dominik
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-11-08 8:12 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20091024194219.GA19546@comet.dominikbrodowski.net>
2009-10-24 19:43 ` [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers) Dominik Brodowski
2009-10-26 6:42 ` Artem Bityutskiy
2009-10-26 7:13 ` Dominik Brodowski
2009-10-26 7:26 ` Artem Bityutskiy
2009-10-26 7:56 ` Dominik Brodowski
2009-10-26 8:05 ` Artem Bityutskiy
2009-10-26 10:19 ` Alan Cox
2009-10-26 10:18 ` Artem Bityutskiy
2009-11-03 8:37 ` Artem Bityutskiy
2009-11-07 11:19 ` pcmciamtd -- what's broken, who needs it? Dominik Brodowski
2009-11-07 11:29 ` Komuro
2009-11-07 11:33 ` Dominik Brodowski
2009-11-07 16:57 ` Kristoffer Ericson
2009-11-08 8:12 ` Dominik Brodowski
2009-11-07 22:33 ` Komuro
2009-11-04 10:20 ` PETEC 2MB SRAM Pep Talens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox