Skip to contentSkip to conversation

nozomi version 2.1c for review

PATCH Frank Seidel 4 participants 10 messages Nov 9, 2007 – Nov 28, 2007 1 message not in the archive Char and misc drivers

lore
Share & tools
lore
#0 lore raw

Hi,

this is a small rework of the nozomi driver (based on the last version from Gregs patches repository).
As my goal is to hopefully get it sometime into mainline, i really would be very thankfull for any kind of feedback.

Please take into account this is my first real work on a kerneldriver and so i likely still have a lack of a lot of kernelknowledge. But i will do my best :-)
Of course i also used the checkpatch.pl script and ensured the patch itself should be ok.

The main change is the now really working multicard support (which i tested on a dockingstation with a separte cardbus controller). Further i did some minor cleanups as e.g. i used the "rats" tool to find some possible securtiy problems and fixed those, and (a bit ago and already in Gregs git repository) i resolved and removed all those GET_* and SET_* macros.

Thanks a lot,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Thu, 24 Aug 2006 01:25:46 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: Add nozomi driver to the tree

This is a driver to control the cardbus wireless data card that works on 3g networks.

It still needs a lot of cleanup, but is getting there... at least it builds with no warnings on i386 now...

Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 2230 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2241 insertions(+)
drivers/char/Kconfig +10 -0
Index: w_gregkh_patchset/drivers/char/Kconfig
===================================================================
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
Index: w_gregkh_patchset/drivers/char/Makefile
===================================================================
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +2282 -0

2,282 lines not on this page · raw message

#1 lore raw
Quoted 2 lines

and already in Gregs git repository) i resolved and removed all those GET_* and SET_* macros.

Oh good, that was long overdue.

drivers/char/nozomi.c line 887

Quoted 4 lines
drivers/char/nozomi.c new file +4 -0
+	switch (port) {
+	case PORT_MDM:
+		dc->last_ier = (dc->last_ier & ~MDM_UL) | MDM_UL;
+		break;

The & ~xxx is unneeded if you then set it again always

Could also clean up to be

	u8 mask[NR_PORTS] = { DIAG_UGL, APP1_UL, ... }
	dc->last_ier |= mask[port];

instead of the switch - ditto disable transmit_ul etc

drivers/char/nozomi.c line 892

Quoted 5 lines
drivers/char/nozomi.c new file +5 -0
+	case PORT_DIAG:
+		dc->last_ier = (dc->last_ier & ~DIAG_UL) | DIAG_UL;
+		break;
+	case PORT_APP1:
+		dc->last_ier = (dc->last_ier & ~APP1_UL) | APP1_UL;

Looking a lot better than before and with plenty of scope for more improvement now it can be read.

Alan

#2 lore raw
Quoted 7 lines · you (Alan Cox)

Review

Quoted 4 lines
(quoted diff) +4 -0
+	switch (port) {
+	case PORT_MDM:
+		dc->last_ier = (dc->last_ier & ~MDM_UL) | MDM_UL;
+		break;

The & ~xxx is unneeded if you then set it again always

Quoted 6 lines

Could also clean up to be

	u8 mask[NR_PORTS] = { DIAG_UGL, APP1_UL, ... }
	dc->last_ier |= mask[port];

instead of the switch - ditto disable transmit_ul etc

Thank you very much for your feedback. This is exactly what i hoped for.

This now incorporates your suggestions (even though IMHO the mask arrays should be of type u16 - at least I think so), I reviewed the output of sparse from nozomi.c and removed cause for a warning, and rebased the patch on latest version of Gregs git repository (now for 2.6.24-rc2).

I really appreciated any feedback or hint were to dig further or what should be done and fixed.

Thanks,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Thu, 24 Aug 2006 01:25:46 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: Add nozomi driver to the tree

This is a driver to control the cardbus wireless data card that works on 3g networks.

It still needs a lot of cleanup, but is getting there... at least it builds with no warnings on i386 now...

Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 2230 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2241 insertions(+)
drivers/char/Kconfig +10 -0
Index: linux-2.6.24-rc2/drivers/char/Kconfig
===================================================================
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
Index: linux-2.6.24-rc2/drivers/char/Makefile
===================================================================
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +2221 -0

2,221 lines not on this page · raw message

#3 lore raw
Quoted 2 lines · you (Frank Seidel)

I really appreciated any feedback or hint were to dig further or what should be done and fixed.

Thanks to the great patches from Jiri Slaby <[email protected]> this is now again a probably big step forward for the nozomi driver. Besides the multicard-rework and read/write_mem-rework this contains all patches from Jiri with very few changes from my side.

Thanks for all your help,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Thu, 24 Aug 2006 01:25:46 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: Add nozomi driver to the tree

This is a driver to control the cardbus wireless data card that works on 3g networks.

It still needs a lot of cleanup, but is getting there... at least it builds with no warnings on i386 now...

Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver.
Thanks to Jiri Slaby <[email protected]> for a lot bugfixes, cleanups and rewrites that make it much more readable.

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 2230 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2241 insertions(+)
drivers/char/Kconfig +10 -0
Index: linux-2.6.24-rc2/drivers/char/Kconfig
===================================================================
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
Index: linux-2.6.24-rc2/drivers/char/Makefile
===================================================================
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +2135 -0

2,135 lines not on this page · raw message

#4 lore raw

[RFC] Re: nozomi version 2.1d for review

Hello,

this one also holds the - little reworked and optimized - cleanup of the read/write_mem32 functions.

Comments and any feedback is more than welcome.

Thanks a lot - especially to Jiri, Alan and Greg,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Thu, 24 Aug 2006 01:25:46 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: Add nozomi driver to the tree

This is a driver to control the cardbus wireless data card that works on 3g networks.

It still needs a lot of cleanup, but is getting there... at least it builds with no warnings on i386 now...

Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver.
Thanks to Jiri Slaby <[email protected]> for a lot bugfixes, cleanups and rewrites that make it much more readable.

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 2105 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2116 insertions(+)
drivers/char/Kconfig +10 -0
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +2105 -0

2,105 lines not on this page · raw message

#5 lore raw

Re: [RFC] Re: nozomi version 2.1d for review

Quoted 2 lines · you (Frank Seidel)

this one also holds the - little reworked and optimized - cleanup of the read/write_mem32 functions.

Yes, again a new version, but this one really has a big rework of the multicard support from Jiri (with minor changes from me).

As now all of Jiris patches are incorporated for now this will probably be it for a while.

But still of course any any feedback and comments are more than welcome and i would love keep working on this :-).

Thanks,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Thu, 24 Aug 2006 01:25:46 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: Add nozomi driver to the tree

This is a driver to control the cardbus wireless data card that works on 3g networks.

It still needs a lot of cleanup, but is getting there... at least it builds with no warnings on i386 now...

Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver.
Thanks to Jiri Slaby <[email protected]> for a lot bugfixes, cleanups and rewrites that make it much more readable.

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 1995 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2006 insertions(+)
drivers/char/Kconfig +10 -0
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +1995 -0

1,995 lines not on this page · raw message

#6 lore raw

Re: [RFC] Re: nozomi version 2.1d for review

In reply to Frank Seidel

Hi Frank

I was wondering if you had a git tree somewhere I could pull.

Thanks

Mike

Quoted 9 lines · Frank Seidel

Hello,

this one also holds the - little reworked and optimized - cleanup of the read/write_mem32 functions.

Comments and any feedback is more than welcome.

Thanks a lot - especially to Jiri, Alan and Greg,
Frank

#7 lore raw

Re: [RFC] Re: nozomi version 2.1d for review

Quoted 3 lines · you (Michael Lothian)

Hi Frank

I was wondering if you had a git tree somewhere I could pull.

Hello Mike,

no, unfortunately currently not. From time to time (when i feel enough worthwhile changes came together) i send a new version to Greg who then puts it in his kernel patchset git repository:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/patches.git

I still have a small update in the queue for him i felt wouldn't be enough for another update, but as you are asking perhaps you also are interested in this small change.

It is a further cleanup of the read/write_mem32 functions to get rid of unpleasant and not needed attributes (resolved together with great help from Jiri again).

Thanks,
Frank
---

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Fri, 9 Nov 2007 14:49:23 +0100
From: Frank Seidel <[email protected]>
To: Greg KH <[email protected]>
Subject: nozomi driver

This is a driver to control the cardbus wireless data card that works on 3g networks.

Greg Kroah-Hartman <[email protected]> did the initial driver cleanup. Thanks to Arnaud Patard <[email protected]> for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes.
Thanks to Satyam Sharma <[email protected]> for fixing buildbreakage. Thanks to Frank Seidel <[email protected]> for a lot of bugfixes and rewriting to make it a sane Linux driver.
Thanks to Jiri Slaby <[email protected]> for a lot bugfixes, cleanups and rewrites that make it much more readable.

---
 drivers/char/Kconfig  |   10 
 drivers/char/Makefile |    1 
 drivers/char/nozomi.c | 1993 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2004 insertions(+)
drivers/char/Kconfig +10 -0
@@ -373,6 +373,16 @@ config ISTALLION
 	  To compile this driver as a module, choose M here: the
 	  module will be called istallion.
 
+config NOZOMI
+	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
+	depends on PCI && EXPERIMENTAL
+	help
+	  If you have a HSDPA driver Broadband Wireless Data Card -
+	  Globe Trotter PCMCIA card, say Y here.
+
+	  To compile this driver as a module, choose M here, the module
+	  will be called nozomi.
+
 config A2232
 	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
drivers/char/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_SERIAL167)		+= serial167.o
 obj-$(CONFIG_CYCLADES)		+= cyclades.o
 obj-$(CONFIG_STALLION)		+= stallion.o
 obj-$(CONFIG_ISTALLION)		+= istallion.o
+obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_DIGIEPCA)		+= epca.o
 obj-$(CONFIG_SPECIALIX)		+= specialix.o
 obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
drivers/char/nozomi.c new file +1993 -0

1,993 lines not on this page · raw message

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [RFC] Re: nozomi version 2.1d for review

Quoted 6 lines · Michael Lothian

Thanks for the info

Is there any news on when this is going to go upstream? I've been asking for a while, each time there is a flurry of activity but then it fizzles out by the time the 2 week window is open and is forgotten about again

I have it queued up in my tree to go to Linus for 2.6.25. Is that ok?

Frank, want me to take the last version you just sent out and update my version?

thanks,

greg k-h

#10 lore raw

Re: [RFC] Re: nozomi version 2.1d for review

Quoted 2 lines · you (Greg KH)

Frank, want me to take the last version you just sent out and update my version?

Yes, that would be great.

Thanks a lot,
Frank