public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* serial driver not properly detecting modem
@ 2001-04-24  3:38 Steven Walter
  2001-04-24 11:04 ` Jeff Garzik
  2001-04-24 13:38 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Walter @ 2001-04-24  3:38 UTC (permalink / raw)
  To: linux-kernel

It would seem that I have a modem (hardware based, not winmodem) of
PCI_CLASS_COMMUNICATION_OTHER.  This, unfortunately, prevents it from
being automagically detected by the serial driver, which only looks for
devices of PCI_CLASS_COMMUNICATION_SERIAL.

I've fixed this here merely by adding an entry to the PCI table of
serial.c for PCI_CLASS_COMMUNICATION_OTHER.  Is this the best way to fix
this?  Is there some reason that this shouldn't be done in general?  If
not, I'd like to see it fix in the kernel proper.

It should be noted that the modem is listed in serial.c's pci_boards,
perhaps it would be best for the serial driver to list PCI_ID_ANY for a
class, and only use pci_boards to further identify serial ports?  Or
would this be too inefficient to correct for a few misguided hardware
makers?

Thanks
-- 
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: serial driver not properly detecting modem
  2001-04-24  3:38 serial driver not properly detecting modem Steven Walter
@ 2001-04-24 11:04 ` Jeff Garzik
  2001-04-24 13:38 ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2001-04-24 11:04 UTC (permalink / raw)
  To: Steven Walter; +Cc: linux-kernel

Steven Walter wrote:
> 
> It would seem that I have a modem (hardware based, not winmodem) of
> PCI_CLASS_COMMUNICATION_OTHER.  This, unfortunately, prevents it from
> being automagically detected by the serial driver, which only looks for
> devices of 
> 
> I've fixed this here merely by adding an entry to the PCI table of
> serial.c for PCI_CLASS_COMMUNICATION_OTHER.  Is this the best way to fix
> this?  Is there some reason that this shouldn't be done in general?  If
> not, I'd like to see it fix in the kernel proper.

That won't work for a general rule, since winmodems list themselves as
'OTHER' too.  Just add your PCI id above the
PCI_CLASS_COMMUNICATION_SERIAL.

Make sure you cc me and tytso@mit.edu on such a patch...

-- 
Jeff Garzik      | The difference between America and England is that
Building 1024    | the English think 100 miles is a long distance and
MandrakeSoft     | the Americans think 100 years is a long time.
                 |      (random fortune)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: serial driver not properly detecting modem
  2001-04-24  3:38 serial driver not properly detecting modem Steven Walter
  2001-04-24 11:04 ` Jeff Garzik
@ 2001-04-24 13:38 ` Alan Cox
  2001-04-24 13:46   ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2001-04-24 13:38 UTC (permalink / raw)
  To: Steven Walter; +Cc: linux-kernel

> I've fixed this here merely by adding an entry to the PCI table of
> serial.c for PCI_CLASS_COMMUNICATION_OTHER.  Is this the best way to fix
> this?  Is there some reason that this shouldn't be done in general?  If
> not, I'd like to see it fix in the kernel proper.

Most class other devices wont be 16x50 compatible.

> It should be noted that the modem is listed in serial.c's pci_boards,
> perhaps it would be best for the serial driver to list PCI_ID_ANY for a
> class, and only use pci_boards to further identify serial ports?  Or
> would this be too inefficient to correct for a few misguided hardware
> makers?

Probably serial.c should look for class serial || (class_other && in table)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: serial driver not properly detecting modem
  2001-04-24 13:38 ` Alan Cox
@ 2001-04-24 13:46   ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2001-04-24 13:46 UTC (permalink / raw)
  To: Alan Cox; +Cc: Steven Walter, linux-kernel, tytso

Alan Cox wrote:
> 
> > I've fixed this here merely by adding an entry to the PCI table of
> > serial.c for PCI_CLASS_COMMUNICATION_OTHER.  Is this the best way to fix
> > this?  Is there some reason that this shouldn't be done in general?  If
> > not, I'd like to see it fix in the kernel proper.
> 
> Most class other devices wont be 16x50 compatible.

winmodems are class other

> > It should be noted that the modem is listed in serial.c's pci_boards,
> > perhaps it would be best for the serial driver to list PCI_ID_ANY for a
> > class, and only use pci_boards to further identify serial ports?  Or
> > would this be too inefficient to correct for a few misguided hardware
> > makers?
> 
> Probably serial.c should look for class serial || (class_other && in table)

no need to consider class other at all, since there are so many
exceptions.  Build the serial.c pci table like

	board 1
	board 2
	board 3
	class 1
	class 2
	class 3

Special cases go before the classes.  A 16x50 compatible class other is
definitely a special case...

On a side note, an outstanding to-do item for the serial driver is to
move its huge honkin' custom PCI table into the pci_device_id standard
table.  The pci_device_id::driver_data member would then become an index
into the smaller custom PCI table.

-- 
Jeff Garzik      | The difference between America and England is that
Building 1024    | the English think 100 miles is a long distance and
MandrakeSoft     | the Americans think 100 years is a long time.
                 |      (random fortune)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-24 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-24  3:38 serial driver not properly detecting modem Steven Walter
2001-04-24 11:04 ` Jeff Garzik
2001-04-24 13:38 ` Alan Cox
2001-04-24 13:46   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox