[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

esp pcmcia scsi driver



¤³¤ó¤Ë¤Á¤Ï¡¡°ËÆ£¤Ç¤¹
2001/07/16¤Ëtar_files¤«¤é¤È¤Ã¤Æ¤­¤¿i386¤Î-current¤ò
»È¤Ã¤Æ¤¤¤Þ¤¹

# ¤â¤¦£²¡¤£³ÆüǺ¤ó¤À·ë²Ì¤Ê¤Î¤Ç¡¤Ä¹¤¯¤Ê¤Ã¤Æ¤Þ¤¹¡¡¤¹¤¤¤Þ¤»¤ó
# ²ÆµÙ¤ß¤Þ¤Ç¤¢¤È£±Æü¤·¤«¤Ê¤¤¤Î¤Ç¤Á¤ç¤Ã¤È¤¢¤»¤Ã¤Æ¤Þ¤¹

¼ê¸µ¤ËMELCO¤ÎBUFFALO IFC-DC¤¬¤¢¤Ã¤¿¤Î¤Ç¡¤CIS¤ò¸«¤Æ¤ß¤¿¤é
RATOC REX-9530¤Ç¡¤¤³¤¤¤Ä¤òÄ´¤Ù¤Æ¤ß¤ë¤ÈFAS408¤é¤·¤¤¤Î¤Ç¡¤
esp_pcmcia¤Ç¤µ¤¯¤Ã¤ÈÆ°¤¯¤È»×¤Ã¤Æ¤¤¤Þ¤·¤¿¡¥¡¥¡¥¤·¤«¤·¡¤¤½¤ì¤Û¤É´Å¤¯¤Ï¤Ê¤«¤Ã¤¿

¤³¤Î¥«¡¼¥É¤ÏManufacture code:0xc015¡¤Product:0x1¤Ê¤Î¤Ç¡¤
RATOC REX-R280¤Ëmatch¤·¤Æ¤·¤Þ¤¤¤Þ¤¹
¤Ê¤Î¤Ç¡¤¤³¤ì¤é¤Î¥«¡¼¥É¤ò¶¦Â¸¤µ¤»¤ë¤¿¤á¤Ë¤Ï¥ê¥Æ¥é¥ë¤Çmatch¤µ¤»¤ë
ɬÍפ¬¤¢¤ë¤è¤¦¤Ç¤¹
¤³¤ÎÉôʬ¤Î½¤Àµ¤ò¤·¤Æ¡¤RATOC REX-9530¤òǧ¼±¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Þ¤·¤¿

# ¤³¤ÎÉôʬ¤Ï¡¤¥½¡¼¥¹¤ò¤â¤¦¾¯¤·À°Íý¤Ç¤­¤¿¤ésend-pr¤·¤è¤¦¤È»×¤Ã¤Æ¤Þ¤¹

¤½¤ì¤Ç¡¤
esp_pcmcia_attach -> ncr53c9x_attach -> (config_found) -> scsibusattach
-> (config_interrupts) -> scsibus_config_interrupts -> scsi_probe_bus
-> scsi_probe_device -> scsipi_test_unit_ready¤Î½ç¤ÇÆ°ºî¤¹¤ë¤Î¤ò³Îǧ¤Ç¤­¤¿
¤Î¤Ç¤¹¤¬¡¤target=0¡¤lun=0¤Îtest unit ready¤ò½Ð¤·¤¿¤È¤³¤í¤Ç»ß¤Þ¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹
³ä¤ê¹þ¤ß¤¬½Ð¤Æ¤Ê¤¤¤Î¤«¤È»×¤¤¡¤FreeBSD¡¤Linux¤Î¥½¡¼¥¹¤ò¸«¤Ê¤¬¤éÄ´¤Ù¤Æ¤ß¤¿¤Î
¤Ç¤¹¤¬¡¤ÆäËchip¤«¤é¤Î *³ä¤ê¹þ¤ß¤Ë´Ø¤ï¤ëÉôʬ* ¤Ç¤ÎÁê°ã¤Ï¸«Åö¤¿¤é¤Ê¤«¤Ã¤¿¤Ç¤¹
# ¾¯¤·FreeBSD¤ò»²¹Í¤Ë¤·¤Æ¼ê¤òÆþ¤ì¤Æ¤ß¤Þ¤·¤¿¤¬¡¥¡¥¡¥
»ö¼Â¡¤¥ª¥·¥í¤Ç¸«¤Æ¤ß¤ë¤Èchip¤«¤é¤Î³ä¤ê¹þ¤ß¤Ï½Ð¤Æ¤¤¤ë¤è¤¦¤Ç¤¹

³ä¤ê¹þ¤ß¤¬½Ð¤Æ¤¤¤ëÁ°Äó¤Ç¡¤¤¢¤é¤¿¤á¤Æscsipi¤Î¥½¡¼¥¹¤òÄɤ¤¤«¤±¤¿¤Î¤Ç¤¹¤¬¡¤
scsi_probe_bus -> scsipi_adapter_addref
-> (adapt->adapt_enable¤¬¤¢¤ì¤Ð¡¤¤½¤ì¤ò¼Â¹Ô) -> (return to scsi_probe_bus)
-> scsi_probe_device -> scsipi_test_unit_ready -> scsipi_command ->
¡¦¡¦ÅÓÃæ¾Êά(¾Ð)¡¦¡¦
-> (sc_adapter.adapter_request¤Ç»ØÄꤵ¤ì¤¿)ncr53c9x_scsipi_request
-> ncr53c9x_sched -> ncr53c9x_select
¤È¤Ê¤Ã¤¿¤¢¤È¤Ë¡¤
ncr53c9x_intr¡¤ncr53c9x_poll¡¤¤â¤·¤¯¤Ïesp_pcmcia_poll¤Ë¤Ç¤âÆþ¤Ã¤Æ½èÍý
¤¬Â³¤¯¤Î¤Ç¤·¤ç¤¦¤¬¡¤¤É¤Á¤é¤Ë¤â½èÍý¤¬¤³¤Ê¤¤¤Ç¤½¤Î¤Þ¤Þ¤À¤ó¤Þ¤ê¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹
chip¤«¤é³ä¹þ¤ß¤¬½Ð¤Æ¤¤¤ë¤Ë¤â´Ø¤ï¤é¤º¤Ë¤Ç¤¹
interrupt handler¤ÎÅÐÏ¿¤¢¤¿¤ê¤òÄ´¤Ù¤Æ¤ß¤ë¤È esp_pcmcia_enable ¤Ç
½èÍý¤·¤Æ¤¤¤ë¤è¤¦¤Ê¤Î¤Ç¤¹¤¬¡¤¤³¤¤¤Ä¤¬Ã¯¤«¤é¤â¸Æ¤Ð¤ì¤Æ¤¤¤Þ¤»¤ó
scsipi_adapter_addref ¤«¤é adapt->adapt_enable¤È¤·¤Æ¸Æ¤Ó½Ð¤µ¤ì¤ë
¤È¤Ä¤¸¤Ä¤Þ¤¬¤¢¤¦¤Î¤Ç¡¤
esp_pcmcia_attach ¤Ç¡¤sc->sc_adapter.adapt_enable = esp_pcmcia_enable;
¤òÄɲ䷤Ƥߤ¿¤é¡¤device¤Îprobe¤Þ¤ÇÀ®¸ù¤·¤Æ¤è¤¦¤ä¤¯Î©¤Á¾å¤¬¤ê¤Þ¤·¤¿

¤³¤³¤«¤é¤¬¼ÁÌä¤Ê¤Î¤Ç¤¹¤¬¡¤
1. cvs¤ÇºÇ¿·¤Î¥½¡¼¥¹¤ò³Îǧ¤·¤Æ¤â¡¤adapt_enable¤ÏÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¤¹¤¬¡¤
   esp¤¬¤â¤È¤â¤ÈÂоݤˤ·¤Æ¤¤¤ëPanasonic KXLC002¤Ï¡¤-current¤ÇÆ°ºî¤·¤Æ¤¤¤ë
   ¤Î¤Ç¤·¤ç¤¦¤«
2. Æ°ºî¤·¤Æ¤¤¤ë¤È¤·¤¿¤épolling¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¤·¤ç¤¦¤«
   ¤¿¤È¤¨polling¤À¤È¤·¤Æ¤â¡¤°Ê²¼¤ÎÅÀ¤¬Ê¬¤«¤é¤Ê¤¤¤Ç¤¹
    ¡¦esp_pcmcia.c ¤Ç #ifdef ESP_PCMCIA_POLL ¤µ¤ì¤Æ¤¤¤ì¤½¤ì¤Ã¤Ý¤¤
      ¤Î¤Ç¤¹¤¬¡¤¤³¤ì¤Ï¥¿¥¤¥à¥¢¥¦¥È¤ò´Æ»ë¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¤À¤±¤À¤È»×¤ï¤ì¤Þ¤¹
    ¡¦ncr53c9x_poll¤¬¸Æ¤Ð¤ì¤ë¤È¤·¤¿¤é¡¤XS_CTL_POLL¤Î¥Õ¥é¥°¤¬Î©¤Ã¤Æ¤¤¤ë
      ɬÍפ¬¤¢¤ê¡¤¤³¤Î¤¿¤á¤Ë¤Ï¡¤
      adapt->adapt_flags |= SCSIPI_ADAPT_POLL_ONLY; ¤È¤Ê¤Ã¤Æ¤¤¤ëɬÍ×
      ¤¬¤¢¤ë¤È»×¤¦¤Î¤Ç¤¹¤¬¡¤¤³¤Î¥Õ¥é¥°¤â¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó
      ¤Þ¤¿¡¤scsipi_get_xs¤Çcold boot»þ(cold == 1)¤Ç¤¢¤ì¤Ð¡¤XS_CTL_POLL
      ¤òΩ¤Æ¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¤pcmcia_attach»þÅÀ¤Ç´û¤Ë cold == 0 ¤Ë¤Ê¤Ã¤Æ
      ¤·¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡¡¤Þ¤¢¡¤¤½¤ì°ÊÁ°¤Ëµ¯Æ°¸åPC Card¤òÁÞ¤·¤¿¤ê¤·¤¿¾ì¹ç¤Ï¡¤
      cold ¤ÏÀäÂÐ 0 ¤Ë¤Ê¤Ã¤Æ¤ë¤È»×¤ï¤ì¤Þ¤¹

esp_pcmcia.c¤«¤é
sc->sc_adapter.adapt_enable = esp_pcmcia_enable;
¤¬È´¤±¤Æ¤¤¤ë¤À¤±¤À¤È¤·¤¿¤é¡¤3¥ö·î¤âÊüÃÖ¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤â̵¤¤¤Î¤Ç¡¤
º¬ËÜŪ¤Ë²¿¤«Â礭¤Ê´ª°ã¤¤¤ò¤·¤Æ¤¤¤ë¤Î¤Ç¤·¤ç¤¦¤«¡¥¡¥¡¥

NetBSD¤Î¥É¥é¥¤¥Ð¤òÄɤ¤¤«¤±¤ë¤Î¤Ï½é¤á¤Æ¤Ê¤Î¤Ç¡¤µ¹¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹
# ¤¤¤Á¤ª¤¦¡¡Æ¨¤²¤ò¤¦¤Ã¤Æ¤ª¤­¤Þ¤¹¡Ê¾Ð¡Ë