From nobody@FreeBSD.org  Sun Jul 30 10:47:18 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DB41016A4DA
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Jul 2006 10:47:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A1A5243D45
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Jul 2006 10:47:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6UAlHfv074219
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Jul 2006 10:47:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6UAlHqt074218;
	Sun, 30 Jul 2006 10:47:17 GMT
	(envelope-from nobody)
Message-Id: <200607301047.k6UAlHqt074218@www.freebsd.org>
Date: Sun, 30 Jul 2006 10:47:17 GMT
From: Nikolas Britton <nikolas.britton@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: PATCH: Updates to arcmsr(4)
X-Send-Pr-Version: www-2.3

>Number:         101045
>Category:       kern
>Synopsis:       [arcmsr] [patch] Updates to arcmsr(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 30 10:50:15 GMT 2006
>Closed-Date:    Wed May 28 21:19:08 UTC 2008
>Last-Modified:  Wed May 28 21:19:08 UTC 2008
>Originator:     Nikolas Britton
>Release:        FreeBSD 6.1-STABLE
>Organization:
N/A
>Environment:
FreeBSD infomatic.local 6.1-STABLE FreeBSD 6.1-STABLE #0: Fri Jun 16 23:16:52 CDT 2006     nbritton@infomatic.local:/usr/src/sys/i386/compile/INFOMATIC  i386

>Description:
These are patches to update the Areca driver in FreeBSD with most current
driver provided by Areca, v1.20.00.12. 

* New support for ARC-1170 and ARC-1270 24port RAID controllers.
* Bug fixes and code cleanup.
* Bug fix with abort command handling.
* Firmware version check.
* Firmware update notify for hardware bug fix handling if none zero high
  part physical address of srb resource.
>How-To-Repeat:
N/A
>Fix:
*** Here is the new arcmsr.c ready for import into FreeBSD: ***
http://www.nbritton.org/uploads/areca/arcmsr.c.freebsd.new

Here is the new arcmsr.c that the new FreeBSD driver is based on:
http://www.nbritton.org/uploads/areca/arcmsr.c.1200012

Here is the old arcmsr.c from FreeBSD -CURRENT:
http://www.nbritton.org/uploads/areca/arcmsr.c.freebsd.old

Here is the old arcmsr.c that the old FreeBSD driver was based on: 
http://www.nbritton.org/uploads/areca/arcmsr.c.1200002

*** Here is the new arcmsr.h patch: ***
http://www.nbritton.org/uploads/areca/arcmsr.h.patch

*** Here is the new man page: ***
http://www.nbritton.org/uploads/areca/arcmsr.4.new

Other files can be found here:
http://www.nbritton.org/uploads/areca/
------------------------------------------------
Below are merges I did manualy from the old FreeBSD driver to the new Areca
driver... CHECK MY WORK, I don't know what I'm doing! I was not able to merge
all of the changes made on the old FreeBSD code because the new code was
different, here is the stuff I changed that needs to be checked:

diff arcmsr.c.1200012 arcmsr.c.freebsd.new
48a49
> ** $FreeBSD$
76d76
< #include <machine/clock.h>
1363c1363
<       if(pccb->ccb_h.status != CAM_REQ_INPROG)
---
>       if((pccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG)
1687,1691c1687
<                                               struct bus_dma_segment seg;
<
<                                               seg.ds_addr=(bus_addr_t)pccb->csio.data_ptr;
<                                               seg.ds_len=pccb->csio.dxfer_len;
<                                               arcmsr_executesrb(pSRB,&seg,1,0);
---
>                                               panic("arcmsr: CAM_DATA_PHYS not supported");
2166c2162
<                                               /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
---
>                                               /*lowaddr*/BUS_SPACE_MAXADDR,
2181c2177
<                                               /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
---
>                                               /*lowaddr*/BUS_SPACE_MAXADDR,
2242c2238
<                                               /*flags*/BUS_DMA_ALLOCNOW,
---
>                                               /*flags*/0,
2257c2253
<                                               /*flags*/BUS_DMA_ALLOCNOW,
---
>                                               /*flags*/0,
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: antoine 
State-Changed-When: Wed May 28 21:17:03 UTC 2008 
State-Changed-Why:  
Close: arcmsr(4) has been updated to 1.20.00.15 and this work 
has been MFCed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101045 
>Unformatted:
