Skip to contentSkip to conversation

Is it possible for Realtek card reader driver to reside in SCSI subsystem?

DISCUSSION edwin_rong 4 participants 7 messages Apr 23, 2012 – Apr 24, 2012 SCSI

lore
Share & tools
lore

edwin_rong

author
#0 lore raw

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

Thanks & BRs
Edwin.Rong

#1 lore raw
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

James

author
#2 lore raw

Re: Is it possible for Realtek card reader driver to reside in SCSIsubsystem?

Quoted 27 lines · James Bottomley
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

Quoted 2 lines

James

Dear James,

Got it, thanks for your response, sincerely.

As to my case, which subsystem do you think is fit for our driver to stay, could you give me some suggestions?

Thanks & BRs
Edwin

maintainer
#3 lore raw

Re: Is it possible for Realtek card reader driver to reside in SCSIsubsystem?

[updated Greg to non-SUSE address]

Quoted 28 lines · edwin_rong
Quoted 27 lines · James Bottomley
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

Quoted 8 lines
Quoted 2 lines

James

Dear James,

Got it, thanks for your response, sincerely.

As to my case, which subsystem do you think is fit for our driver to stay, could you give me some suggestions?

Well, you said it's a combination of mmc and memstick. If it can be bound as two separate drivers, I'd say one in each. If there's magic that has to be done in the binding (as in you need a single bind driver that activates each component), I'd say be guided by the maintainers of those components. My instinct would be to put it in one and use the other via Kconfig, but whatever they find most appropriate.

James

author
#4 lore raw

Re: Is it possible for Realtek card reader driver to reside inSCSIsubsystem?

Quoted 38 lines · James Bottomley

[updated Greg to non-SUSE address]

Quoted 28 lines · edwin_rong
Quoted 27 lines · James Bottomley
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

Quoted 8 lines
Quoted 2 lines

James

Dear James,

Got it, thanks for your response, sincerely.

As to my case, which subsystem do you think is fit for our driver to stay, could you give me some suggestions?

Quoted 10 lines

Well, you said it's a combination of mmc and memstick. If it can be bound as two separate drivers, I'd say one in each. If there's magic that has to be done in the binding (as in you need a single bind driver that activates each component), I'd say be guided by the maintainers of those components. My instinct would be to put it in one and use the other via Kconfig, but whatever they find most appropriate.

James

Gotcha!

Thanks for your suggestion, James.

BRs
Edwin

#5 lore raw

Re: Is it possible for Realtek card reader driver to reside inSCSIsubsystem?

Quoted 46 lines · edwin_rong
Quoted 45 lines · James Bottomley

[updated Greg to non-SUSE address]

Quoted 28 lines · edwin_rong
Quoted 27 lines · James Bottomley
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

Quoted 8 lines
Quoted 2 lines

James

Dear James,

Got it, thanks for your response, sincerely.

As to my case, which subsystem do you think is fit for our driver to stay, could you give me some suggestions?

Well, you said it's a combination of mmc and memstick. If it can be bound as two separate drivers, I'd say one in each. If there's magic that has to be done in the binding (as in you need a single bind driver that activates each component), I'd say be guided by the maintainers of those components. My instinct would be to put it in one and use the other via Kconfig, but whatever they find most appropriate.

Quoted 6 lines
Quoted 3 lines

James

Gotcha!

Thanks for your suggestion, James.

Also, at the least, you have a lot of basic coding style issues to clean up in the drivers/staging/rts_pstor/ directory before your code can move out of there. Please start working on that as soon as possible.

thanks,

greg k-h

author
#6 lore raw

Re: Is it possible for Realtek card reader driver to resideinSCSIsubsystem?

Quoted 52 lines · Greg KH
Quoted 51 lines · edwin_rong
Quoted 38 lines · James Bottomley

[updated Greg to non-SUSE address]

Quoted 28 lines · edwin_rong
Quoted 27 lines · James Bottomley
Quoted 13 lines · edwin_rong

Dear James and all :

Sorry to disturb you again!

I'm an software engineer of Realtek corporation, responsible for writing driver for Realtek Card Reader chips.

Our device supports SD/MMC/MS/MSpro/xD series of cards, etc., which is implemented as an SCSI device in our driver,
and now our driver rts_pstor is under staging folder of linux kernel, so I want to know whether it is possible to move it out of staging folder, and reside in SCSI subsystem?

Quoted 5 lines

I also know that both "mmc" and "memstick" subsystem exist in kernel now, but our device is a composition of these types of cards, so it seems not suitable for keeping our driver there.

All replies are appreciated.

The general rule is that if the device itself speaks SCSI ... as in either the firmware or the underlying disk does, then you should be using SCSI (This doesn't mean you have to have an actual SCSI device anywhere ... lots of USB devices are some wierd flash or IDE device fronted by a chip that does SCSI<->whatever translation [usually badly]). Conversely if you would be writing your SCSI command emulation in the driver, don't ... you should be using another subsystem.

Quoted 8 lines
Quoted 2 lines

James

Dear James,

Got it, thanks for your response, sincerely.

As to my case, which subsystem do you think is fit for our driver to stay, could you give me some suggestions?

Quoted 10 lines

Well, you said it's a combination of mmc and memstick. If it can be bound as two separate drivers, I'd say one in each. If there's magic that has to be done in the binding (as in you need a single bind driver that activates each component), I'd say be guided by the maintainers of those components. My instinct would be to put it in one and use the other via Kconfig, but whatever they find most appropriate.

James

Gotcha!

Quoted 8 lines
Quoted 1 line

Thanks for your suggestion, James.

Also, at the least, you have a lot of basic coding style issues to clean up in the drivers/staging/rts_pstor/ directory before your code can move out of there. Please start working on that as soon as possible.

thanks,

greg k-h

Dear Greg,

Yes, it is.
Now we're working on the refactor of Realtek card reader driver to make it support
all Realtek driver-based chips with USB or PCIe inferface, that is to say, making all Realtek card reader driver in one,
and it will substitute currently existing "rts_pstro" and "rts5139" under driver/staging directory in the future.

Thanks
Edwin