[smartos-discuss] Re: [developer] HBA recommended except LSI and ARECA
Hi, I get an Adaptec card several days ago, the pci id changed, after add the new pci id, pmcs still can not attach. I checked the linux pm8001 driver, it seems to access some registers, pci bar 4 address need to be shifted. I am out of door now, I think I can try to fix this several days later. 在 2014-5-6 上午2:50,"Keith Wesolowski" 写道: > > On Tue, May 06, 2014 at 12:10:24AM +0800, Fred Liu wrote: > > > I have a 6805H in hand and illumos can not detect it. But I don't have > > experience > > porting driver in FreeBSD it has to illumos. And I do NOT want to waste my > > money.:-) > > Therefore I would like to do anything to pursue this as long as I can! > > There's no reason to port a driver; we already have one. The first step > here is to figure out whether we're even trying to attach. Do you see > the device in the output of prtconf -D? Is pmcs associated with it? If > the answer to both is yes, you will need to figure out why pmcs is not > attaching; check log messages and consider standard driver-attach > debugging methods such as DTrace. If the answer is no, then you will > need to use update_drv(1M) to add an appropriate alias; the alias should > be "pmcs" and the identity should match the PCI vendor and device ID > associated with your card. Because I do not have one in hand, I do not > know what these are. > > If you get all the way into attach and it seems like the device is > simply doing something we don't expect (i.e., that it's a qualitatively > different device than the one our driver expects due to different > firmware, configuration, etc.) then it will be time to start looking at > other OS's drivers for this card and/or engaging with PMC Engineering to > figure out what the device is doing and why. > > All of this is fairly standard in debugging "device not seen" type > issues, so you should have success getting additional tips by searching > the archives; of course, the details end up being device-dependent. > > Good luck! > > > --- > illumos-developer > Archives: https://www.listbox.com/member/archive/182179/=now > RSS Feed: https://www.listbox.com/member/archive/rss/182179/21175337-120aaa74 > Modify Your Subscription: https://www.listbox.com/member/?&; > Powered by Listbox: http://www.listbox.com 在 2014-5-6 上午2:50,"Keith Wesolowski" 写道: > On Tue, May 06, 2014 at 12:10:24AM +0800, Fred Liu wrote: > > > I have a 6805H in hand and illumos can not detect it. But I don't have > > experience > > porting driver in FreeBSD it has to illumos. And I do NOT want to waste > my > > money.:-) > > Therefore I would like to do anything to pursue this as long as I can! > > There's no reason to port a driver; we already have one. The first step > here is to figure out whether we're even trying to attach. Do you see > the device in the output of prtconf -D? Is pmcs associated with it? If > the answer to both is yes, you will need to figure out why pmcs is not > attaching; check log messages and consider standard driver-attach > debugging methods such as DTrace. If the answer is no, then you will > need to use update_drv(1M) to add an appropriate alias; the alias should > be "pmcs" and the identity should match the PCI vendor and device ID > associated with your card. Because I do not have one in hand, I do not > know what these are. > > If you get all the way into attach and it seems like the device is > simply doing something we don't expect (i.e., that it's a qualitatively > different device than the one our driver expects due to different > firmware, configuration, etc.) then it will be time to start looking at > other OS's drivers for this card and/or engaging with PMC Engineering to > figure out what the device is doing and why. > > All of this is fairly standard in debugging "device not seen" type > issues, so you should have success getting additional tips by searching > the archives; of course, the details end up being device-dependent. > > Good luck! > > > --- > illumos-developer > Archives: https://www.listbox.com/member/archive/182179/=now > RSS Feed: > https://www.listbox.com/member/archive/rss/182179/21175337-120aaa74 > Modify Your Subscription: > https://www.listbox.com/member/?&; > Powered by Listbox: http://www.listbox.com > --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
[smartos-discuss] Re: [developer] HBA recommended except LSI and ARECA
Hi, Sorry for the late update. I tried to add suport for adaptec 6805H following the linux pm8001 driver. It seems to access mpi configuration table, BAR4(PMCS_REGSET_2 in pmcs terms) should be used, instead of BAR5(PMCS_REGSET_3) currently used in pmcs. I made the corresponding change to pmcs, patch attached to the mail message, pmcs_setup() now works, but driver attach fails randomly in pmcs_start_mpi(), pmcs_soft_reset() and pmcs_echo_test(). log: May 20 22:12:22 2236 pmcs: [ID 638130 kern.info] INFO: pmcs0: pmcs_attach: firmware event log files: /var/tmp/fwlog0-aap1.0, /var/tmp/fwlog0-iop.0 May 20 22:12:22 2236 pmcs: [ID 327844 kern.info] INFO: pmcs0: pmcs_setup_intr_impl: nintrs = 16 for type: 4 May 20 22:12:22 2236 pmcs: [ID 950610 kern.info] INFO: pmcs0: pmcs_setup_intr_impl: get_navail failed; type: 4 rc: 0 avail: 2 min: 4 May 20 22:12:22 2236 pmcs: [ID 327779 kern.info] INFO: pmcs0: pmcs_setup_intr_impl: nintrs = 32 for type: 2 May 20 22:12:22 2236 pmcs: [ID 837865 kern.info] INFO: pmcs0: pmcs_setup_intr_impl: navail = 2 for type: 2 May 20 22:12:22 2236 pcplusmp: [ID 805372 kern.info] pcplusmp: pciex9005,8081 (pmcs) instance 0 irq 0x36 vector 0x42 ioapic 0xff intin 0xff is bound to cpu 5 May 20 22:12:22 2236 pmcs: [ID 816878 kern.info] INFO: pmcs0: 2 MSI interrupts configured May 20 22:12:22 2236 pmcs: [ID 199423 kern.info] INFO: pmcs0: pmcs_setup: I/O queue depth set too high (512). Setting to 510 May 20 22:12:22 2236 pmcs: [ID 327312 kern.info] INFO: pmcs0: Chip Revision: C; F/W Revision 1.14.7 Released (ILA rev 0111) May 20 22:12:23 2236 pmcs: [ID 579101 kern.info] INFO: pmcs0: pmcs_start_mpi: MPI launch failed (GST 0x901b3 DBCLR 0x0) May 20 22:12:23 2236 pmcs: [ID 778480 kern.info] INFO: pmcs0: pmcs_soft_reset May 20 22:12:24 2236 pmcs: [ID 799962 kern.info] INFO: pmcs0: pmcs_echo_test: command timed out on echo test #0 May 20 22:12:24 2236 unix: [ID 836849 kern.notice] May 20 22:12:24 2236 ^Mpanic[cpu5]/thread=ff02e1366880: May 20 22:12:24 2236 genunix: [ID 498171 kern.notice] echo test May 20 22:12:24 2236 unix: [ID 10 kern.notice] May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb5b0 pmcs:pmcs_attach+156a () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb620 genunix:devi_attach+9e () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb660 genunix:attach_node+14f () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb6b0 genunix:i_ndi_config_node+c9 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb6e0 genunix:i_ddi_attachchild+88 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb720 genunix:devi_attach_node+88 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb7a0 genunix:config_immediate_children+e0 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb7f0 genunix:devi_config_common+d9 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb890 genunix:mt_config_thread+70 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb930 genunix:mt_config_children+19d () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb970 genunix:config_grand_children+34 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cb9c0 genunix:devi_config_common+ec () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cba60 genunix:mt_config_thread+70 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbb00 genunix:mt_config_children+19d () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbb40 genunix:config_grand_children+34 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbb90 genunix:devi_config_common+ec () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbbe0 genunix:ndi_devi_config_driver+76 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbc70 devinfo:di_ioctl+1e6 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbcb0 genunix:cdev_ioctl+39 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbd00 specfs:spec_ioctl+60 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbd90 genunix:fop_ioctl+55 () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbeb0 genunix:ioctl+9b () May 20 22:12:24 2236 genunix: [ID 655072 kern.notice] ff00102cbf00 unix:brand_sys_sysenter+2b7 () May 20 22:12:24 2236 unix: [ID 10 kern.notice] May 20 22:12:24 2236 genunix: [ID 672855 kern.notice] syncing file systems... May 20 22:12:24 2236 genunix: [ID 904073 kern.notice] done # lspci -s 04:00.0 -vvv 04:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H] (rev 05) Subsystem: Adaptec Device 0800 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- wrote: > > >
[smartos-discuss] Re: [developer] HBA recommended except LSI and ARECA
I just want to get it work first, after that i think i can make it support different models. 在 2014-5-21 上午12:15,"Keith Wesolowski" 写道: > On Tue, May 20, 2014 at 10:30:13PM +0800, Zhiwen Zheng wrote: > > > I tried to add suport for adaptec 6805H following the linux pm8001 > driver. > > Before I read the patch, I need to know whether you cut and pasted even > a single line of code from the Linux driver. In general, you really > want to do work like this from a PRM or from a BSD driver, never Linux. > > > It seems to access mpi configuration table, BAR4(PMCS_REGSET_2 in pmcs > > terms) should be used, > > instead of BAR5(PMCS_REGSET_3) currently used in pmcs. > > So are you making this model-specific somehow? Because otherwise you'll > presumably break the existing devices. > --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
[smartos-discuss] Re: [developer] HBA recommended except LSI and ARECA
在 2014-5-21 上午12:15,"Keith Wesolowski" 写道: > > On Tue, May 20, 2014 at 10:30:13PM +0800, Zhiwen Zheng wrote: > > > I tried to add suport for adaptec 6805H following the linux pm8001 driver. > > Before I read the patch, I need to know whether you cut and pasted even > a single line of code from the Linux driver. In general, you really > want to do work like this from a PRM or from a BSD driver, never Linux. no cut and paste from linux. I want to ask why not linux? thanks > > > It seems to access mpi configuration table, BAR4(PMCS_REGSET_2 in pmcs > > terms) should be used, > > instead of BAR5(PMCS_REGSET_3) currently used in pmcs. > > So are you making this model-specific somehow? Because otherwise you'll > presumably break the existing devices. --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com