[request-sponsor] AHCI driver patches for JMicron JMB363
Hi, The AHCI driver in nv78 didn't work with the JMicron JMB363 SATA+IDE controller on my Gigabyte GA-X38-DQ6 motherboard, so I did a bit of debugging to resolve the problem. Attached are two patches which work for me to fix this problem (and the ICH9 SATA controller still works too!): ahci-find-registers.patch - fixes a bug in ahci.c (locating registers) ahci-relax-checks.patch - relaxes some checks violated by the JMB363 I have submitted two corresponding items at http://bugs.opensolaris.org Any feedback on these patches? Would somebody like to sponsor me to get fixes incorporated into opensolaris? Thanks, Luke. -- next part -- diff -r ee58901cb99b usr/src/uts/common/io/sata/adapters/ahci/ahci.c --- a/usr/src/uts/common/io/sata/adapters/ahci/ahci.c Sat Dec 22 18:19:42 2007 -0800 +++ b/usr/src/uts/common/io/sata/adapters/ahci/ahci.c Thu Dec 27 08:22:30 2007 +1100 @@ -2948,7 +2969,6 @@ ahci_port_reset(ahci_ctl_t *ahci_ctlp, a * HBA doesn't support stagger spin-up, force it * to do normal COMRESET */ - ASSERT(port_cmd_status & AHCI_CMD_STATUS_SUD); if (ahci_portp->ahciport_flags & AHCI_PORT_FLAG_SPINUP) { AHCIDBG0(AHCIDBG_INIT, ahci_ctlp, @@ -2964,7 +2984,8 @@ ahci_port_reset(ahci_ctl_t *ahci_ctlp, a AHCIDBG1(AHCIDBG_INFO, ahci_ctlp, "ahci_port_reset: do normal COMRESET", port); - ASSERT(port_cmd_status & AHCI_CMD_STATUS_SUD); + if (!(port_cmd_status & AHCI_CMD_STATUS_SUD)) + cmn_err(CE_WARN, "AHCI_CMD_STATUS_SUD not set") port_scontrol = ddi_get32(ahci_ctlp->ahcictl_ahci_acc_handle, (uint32_t *)AHCI_PORT_PxSCTL(ahci_ctlp, port)); @@ -3107,9 +3128,6 @@ ahci_port_reset(ahci_ctl_t *ahci_ctlp, a if (!(port_task_file & AHCI_TFD_STS_BSY)) { cmn_err(CE_WARN, "ahci_port_reset: port %d BSY bit " "is not set after COMINIT signal is received", port); - ahci_portp->ahciport_port_state |= SATA_PSTATE_FAILED; - rval = AHCI_FAILURE; - goto out; } /* -- next part -- diff -r ee58901cb99b usr/src/uts/common/io/sata/adapters/ahci/ahci.c --- a/usr/src/uts/common/io/sata/adapters/ahci/ahci.c Sat Dec 22 18:19:42 2007 -0800 +++ b/usr/src/uts/common/io/sata/adapters/ahci/ahci.c Thu Dec 27 08:22:30 2007 +1100 @@ -380,6 +380,9 @@ ahci_attach(dev_info_t *dip, ddi_attach_ ushort_t venid; uint8_t revision; int i; + pci_regspec_t *regs; + int regs_length; + int rnumber; #if AHCI_DEBUG int speed; #endif @@ -418,12 +421,30 @@ ahci_attach(dev_info_t *dip, ddi_attach_ attach_state |= AHCI_ATTACH_STATE_STATEP_ALLOC; + /* +* search through DDI "reg" property for the AHCI register set +*/ + if (ddi_prop_lookup_int_array(DDI_DEV_T_ANY, dip, + DDI_PROP_DONTPASS, "reg", (int **)®s, + (uint_t *)®s_length) != DDI_PROP_SUCCESS) { + cmn_err(CE_WARN, "!Cannot lookup reg property"); + goto err_out; + } + for (rnumber = 0; rnumber < regs_length; ++rnumber) { + if ((regs[rnumber].pci_phys_hi & PCI_REG_REG_M)==AHCI_PCI_RNUM) + break; + } + if (rnumber == regs_length) { + cmn_err(CE_WARN, "!Cannot find AHCI register set"); + goto err_out; + } + /* * Now map the AHCI base address; which includes global * registers and port control registers */ status = ddi_regs_map_setup(dip, - AHCI_BASE_REG, + rnumber, (caddr_t *)&ahci_ctlp->ahcictl_ahci_addr, 0, 0, diff -r ee58901cb99b usr/src/uts/common/sys/sata/adapters/ahci/ahcireg.h --- a/usr/src/uts/common/sys/sata/adapters/ahci/ahcireg.h Sat Dec 22 18:19:42 2007 -0800 +++ b/usr/src/uts/common/sys/sata/adapters/ahci/ahcireg.h Wed Dec 26 14:07:54 2007 +1100 @@ -53,8 +53,8 @@ extern "C" { */ #defineAHCI_PRDT_NUMBER257 -/* AHCI base address */ -#defineAHCI_BASE_REG 6 /* BAR5 is the only useful register */ +/* PCI register number for AHCI register set */ +#defineAHCI_PCI_RNUM 0x24 /* various global HBA capability bits */ #defineAHCI_HBA_CAP_NP (0x1f << 0) /* number of ports */
[request-sponsor] [6442434] sponsor request (fwd)
Ashwin, I will be the sponsor for your bug. Please contact me directly from here on. Thanks and regards, Sanjeev. Jayakara Kini wrote: > > Hi Sanjeev, > >Here is the mail from Ashwin. > > ~Kini > > > > ___ > request-sponsor mailing list > request-sponsor at opensolaris.org > -- Forwarded message -- Date: Thu, 13 Dec 2007 01:42:31 +0530 From: ashwin To: request-sponsor at opensolaris.org Subject: [request-sponsor] [6442434] sponsor request Hello all Here is the patch for the bug 6442434 Bug Description: Solaris should have AF_LOCAL/PF_LOCAL/AF_FILE/PF_FILE as synonyms for AF_UNIX/PF_UNIX. Applications from other operating systems may be coded to use AF_LOCAL instead of AF_UNIX. These represent the same thing. We should have a synonym so that such applications are readily portable. I would like to request a sponsor to evaluate my work and help me get it integrated into the next build. My contributor agreement # is OS0144 Thank You in advance. Changes to be made in the file /usr/src/uts/common/sys/socket.h Here is the unified diff for the patch - --- socket.h.origThu Dec 13 02:10:45 2007 +++ socket.hThu Dec 13 02:16:15 2007 @@ -218,6 +218,8 @@ #defineAF_NCA28/* NCA socket */ #defineAF_POLICY29/* Security Policy DB socket */ #defineAF_INET_OFFLOAD30/* Sun private; do not use */ +#define AF_LOCALAF_UNIX +#defineAF_FILEAF_UNIX #defineAF_MAX30 @@ -255,6 +257,8 @@ #definePF_NCAAF_NCA #definePF_POLICYAF_POLICY #definePF_INET_OFFLOADAF_INET_OFFLOAD/* Sun private; do not use */ +#define PF_LOCALPF_UNIX +#definePF_FILEPF_UNIX #definePF_MAXAF_MAX --- Regards Ashwin Bhat K S 3 year information technology NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA Surathkal Sun campus ambassador 99644 98351 ___ request-sponsor mailing list request-sponsor at opensolaris.org -- Solaris Revenue Products Engineering, India Engineering Center, Sun Microsystems India Pvt Ltd. Tel:x27521 +91 80 669 27521
[request-sponsor] Submission of fix for Bug -6626020
Hi all, Here is the fix of Bug -6626020.The following changes need to be made in the file crontab.c The 'else' block starting in line 453 needs to be modified as below: * else { fprintf(stderr, "crontab: %s\n", gettext(ERRSFND)); exit(1); } ** I would like to request a sponsor so that the changes can be evaluated. Regards, Samir Kumar Mishra 3rd year , Electronics and Telecommunication Engg. University College of Engineering, Burla Mob:+919437423414
[request-sponsor] Bug 6280513
Hi , I would like to work on the bug : 6280513 and will finish working on it within 2 week. (I dont have a fix ready yet) Bug ID 6280513 Synopsis init needs to handle SCF_ERROR_NO_RESOURCES from scf_instance_add_pg() Category:Subcategory utility:smf My SCA number is : OS0148 My opensolaris id :rishios Thanks & Regards, Rishi M Nair -- next part -- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/request-sponsor/attachments/20071227/fd8fe314/attachment.html>
[request-sponsor] Submission of fix for Bug -6626020
Hi all, This is to bring to your kind information that I have already submitted my Sun Contributor's Agreement and waiting for getting the SCA number. Further my user-id at opensolaris.org website is sm216278. Regards, Samir Kumar Mishra 3rd year , Electronics and Telecommunication Engg. University College of Engineering, Burla Mob:+919437423414 On 12/27/07, samir kumar mishra wrote: > Hi all, > > Here is the fix of Bug -6626020.The following changes need to be made > in the file crontab.c > > > The 'else' block starting in line 453 needs to be modified as below: > > * > else { > fprintf(stderr, "crontab: %s\n", gettext(ERRSFND)); > exit(1); > } > > ** > I would like to request a sponsor so that the changes can be evaluated. > > > Regards, > Samir Kumar Mishra > 3rd year , Electronics and Telecommunication Engg. > University College of Engineering, Burla > Mob:+919437423414 >
[request-sponsor] Bug 6280513
Hi Rishi, Another OpenSolaris contributor, Avinash Joshi, has already expressed interest to work on this bug. Kindly select a different bug to work on. Regards, Kini On Thu, 27 Dec 2007 11:49 -, Rishi M Nair wrote: }Hi , } }I would like to work on the bug : 6280513 and will finish working on it }within 2 week. (I dont have a fix ready yet) } }Bug ID 6280513 }Synopsis init needs to handle SCF_ERROR_NO_RESOURCES from }scf_instance_add_pg() }Category:Subcategory utility:smf }My SCA number is : OS0148 }My opensolaris id :rishios } }Thanks & Regards, }Rishi M Nair } -- Sun Microsystems - India Engineering Centre http://blogs.sun.com/jkini
[request-sponsor] Submission of fix for Bug -6626020
Samir I will sponsor you for this bug. Please contact me directly from now regarding this. Regards Viswa samir kumar mishra wrote: > Hi all, > > Here is the fix of Bug -6626020.The following changes need to be made > in the file crontab.c > > > The 'else' block starting in line 453 needs to be modified as below: > > * > else { > fprintf(stderr, "crontab: %s\n", gettext(ERRSFND)); > exit(1); > } > > ** > I would like to request a sponsor so that the changes can be evaluated. > > > Regards, > Samir Kumar Mishra > 3rd year , Electronics and Telecommunication Engg. > University College of Engineering, Burla > Mob:+919437423414 > ___ > request-sponsor mailing list > request-sponsor at opensolaris.org >
[request-sponsor] Submission of fix for Bug -6626020
On Dec 27, 2007 6:10 AM, Viswanathan Kannappan wrote: > Samir > > I will sponsor you for this bug. > Please contact me directly from now regarding this. > > Regards > Viswa You might want to note that there's already a sponsor request for this bug. Chad
[request-sponsor] Bugs: 6615447,6248378 , 6445628, 6493125
Hi all. I am interested in working on bugs 6615447,6248378 , 6445628, 6493125. I will work on the bugs one by one. This is just to say the forum that i am interested in working on those bugs. Below are the synopsis and category/subcategory for each bug. Bug ID :: 6615447 Synopsis :: r.manifest can use $smf_alive without ever setting it Category:Subcategory :: utility:smf Bug ID :: 6248378 Synopsis :: general/enabled problems aren't handled completely Category:Subcategory :: utility:smf Bug ID :: 6445628 Synopsis :: Add a ::rootpage dcmd Category:Subcategory :: utility:mdb Bug ID :: 6493125 Synopsis :: df options needlessly differ between /usr/bin/ and /usr/xpg4/bin/ Category:Subcategory :: utility:filesystem My SCA number is OSO145. Thanks & Regards, Avinash Joshi This message posted from opensolaris.org
[request-sponsor] Bug: 6344436
I am so-and-so from Amrita School of Engineering. I am interested in working on bugid 6344436. I'll be submitting a fix tentatively by 10th Jan 2008. 6344436 : *mv* gives cryptic error when applied to unix domain sockets Category/Subcategory: utility:file I have initiated the process to get a SCA number. This message posted from opensolaris.org
[request-sponsor] AHCI driver patches for JMicron JMB363
Luke Deller wrote: > Hi, > > The AHCI driver in nv78 didn't work with the JMicron JMB363 SATA+IDE > controller on my Gigabyte GA-X38-DQ6 motherboard, so I did a bit of > debugging to resolve the problem. > > Attached are two patches which work for me to fix this problem (and the > ICH9 SATA controller still works too!): > ahci-find-registers.patch - fixes a bug in ahci.c (locating registers) > ahci-relax-checks.patch - relaxes some checks violated by the JMB363 > > I have submitted two corresponding items at http://bugs.opensolaris.org > > Any feedback on these patches? Would somebody like to sponsor me to get > fixes incorporated into opensolaris? Hi Luke, I've passed your details onto my colleague Ying. She has done a heap of work on ahci so is probably best placed to help you with this. James C. McPherson -- Senior Kernel Software Engineer, Solaris Sun Microsystems http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
[request-sponsor] Can this be a fix for Bug-6490935?
Hi Carol, This is Samir Kumar Mishra from India. I was just looking at this bug -6490935.(passwd does not handle Control-D input correctly) I think we can make the fix by doing the following changes in getresponse(): ** char *getresponse(char *oldval) { charresp[MAX_INPUT_LEN]; char*retval = NULL; int resplen; char c; if(c==-2) { retval=&c; fprintf(stderr,MSG_CTRL,c); passwd_exit(CTRL); }else { (void) fgets(resp, sizeof (resp) - 1, stdin); resplen = strlen(resp) - 1; if (resp[resplen] == '\n') resp[resplen] = '\0'; if (*resp != '\0' && strcmp(resp, oldval) != 0) retval = strdup(resp); return (retval); } } *** In the above MSG_CTRL is a macro defined under the messages column as #define MSG_CTRL"You have typed %c (or Ctrl-D) which is unacceptable\n" And CTRL is a macro defined under the exit values column as #define CTRL11 /*Exit value for typing Ctrl-D*/ *** Now we include this CTRL macro under the switch-case block of passwd-_exit() function before the default block: case CTRL: (void) fprintf(stderr, "%s\n", gettext(MSG_SHELL_UNCHANGED)); break; Now when we type 'passwd -e' in the shell and when prompted for a new shell, we type Ctrl-D, the output is You have pressed #(or Ctrl-D) which is unacceptable. Login shell unchanged. *** Note: # in the above refers to a unwanted character I have used c == -2 because when i wanted to test what number corresponds to the character generated by pressing Ctrl-D. Here is another idea.If we could know what signal is generated when Ctrl-D is pressed then we can do it more easily. I hope this works out. I would be happier if i can work as your team-member also. Regards, Samir Kumar Mishra 3rd year , Electronics and Telecommunication Engg. UCE, Burla(India)
[request-sponsor] assignment request for Bug ID -6641990
hi i would like to work on this bug and want this assigned to me .it will take me about one month to come back with a contribution. Bug ID 6641990 Synopsis*svcs* should not show instances which don't have a 'general' property group Regrds -- Narendra Pant Campus Ambassadsor College of Technology,Pantnagar INDIA
[request-sponsor] AHCI driver patches for JMicron JMB363
AHCI driver in SNV59, SNV66,75a,76 did work with JMicron JMB363 and Intel ICH8R (set up in BIOS to AHCI mode) on ASUS P5B Deluxe. Just a bit slow, but no more complaints. This message posted from opensolaris.org
[request-sponsor] Can this be a fix for Bug-6490935?
>Hi Carol, > >Now , I have come to know that Ctrl-D doesnot generate a signal but signals >EOF. >So , i made the following changes in the code again. > >* > >char *getresponse(char *oldval) >{ > charresp[MAX_INPUT_LEN]; > char*retval = NULL; > int resplen; > char c; > c=getchar(); getchar() returns an "int" and so "c" must be of type "int". Casper