| plan 9 kernel history: overview | file list | diff list |
2001/1022/port/sd.h (diff list | history)
| 2000/0506/sys/src/9/port/sd.h:32,40 – 2000/0526/sys/src/9/port/sd.h:32,39 (short | long) | ||
| 2000/0506 | int nopen; /* of partitions on this unit */ int changed; | |
| 2000/0526 | Lock rawinuse; | |
| 2000/0506 | int state; | |
| 2000/0526/sys/src/9/port/sd.h:32,38 – 2000/0531/sys/src/9/port/sd.h:32,38 (short | long) | ||
| 2000/0506 | int nopen; /* of partitions on this unit */ int changed; | |
| 2000/0526 |
| |
| 2000/0531 | Lock rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; SDreq* req; } SDunit; | |
| 2000/0531/sys/src/9/port/sd.h:90,95 – 2000/0607/sys/src/9/port/sd.h:90,96 (short | long) | ||
| 2000/0506 | }; enum { | |
| 2000/0607 | SDretry = -5, /* internal to controllers */ | |
| 2000/0506 | SDmalloc = -4, SDeio = -3, SDtimeout = -2, | |
| 2000/0607/sys/src/9/port/sd.h:14,20 – 2000/0617/sys/src/9/port/sd.h:14,20 (short | long) | ||
| 2000/0506 | char user[NAMELEN]; ulong perm; int valid; | |
| 2000/0617 | ulong vers; | |
| 2000/0506 | } SDpart; typedef struct SDunit { | |
| 2000/0607/sys/src/9/port/sd.h:27,36 – 2000/0617/sys/src/9/port/sd.h:27,34 | ||
| 2000/0506 | QLock ctl; ulong sectors; ulong secsize; | |
| 2000/0617 | SDpart* part; /* either nil or points at array of size SDnpart */ ulong vers; | |
| 2000/0506 | ||
| 2000/0531 | Lock rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; | |
| 2000/0617/sys/src/9/port/sd.h:4,18 – 2000/0706/sys/src/9/port/sd.h:4,23 (short | long) | ||
| 2000/0506 | typedef struct SDev SDev; typedef struct SDifc SDifc; typedef struct SDpart SDpart; | |
| 2000/0706 | typedef struct SDperm SDperm; | |
| 2000/0506 | typedef struct SDreq SDreq; typedef struct SDunit SDunit; | |
| 2000/0706 | typedef struct SDperm { | |
| 2000/0506 | char name[NAMELEN]; char user[NAMELEN]; ulong perm; | |
| 2000/0706 | } SDperm; typedef struct SDpart { ulong start; ulong end; SDperm; | |
| 2000/0506 | int valid; | |
| 2000/0617 | ulong vers; | |
| 2000/0506 | } SDpart; | |
| 2000/0617/sys/src/9/port/sd.h:21,38 – 2000/0706/sys/src/9/port/sd.h:26,45 | ||
| 2000/0506 | SDev* dev; int subno; uchar inquiry[256]; /* format follows SCSI spec */ | |
| 2000/0706 | SDperm; | |
| 2000/0506 | Rendez rendez; QLock ctl; ulong sectors; ulong secsize; | |
| 2000/0617 |
| |
| 2000/0706 | SDpart* part; /* nil or array of size SDnpart */ | |
| 2000/0617 | ulong vers; | |
| 2000/0706 | SDperm ctlperm; | |
| 2000/0506 | ||
| 2000/0531 | Lock rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2000/0506 | } SDunit; typedef struct SDev { | |
| 2000/0706/sys/src/9/port/sd.h:32,38 – 2000/0809/sys/src/9/port/sd.h:32,39 (short | long) | ||
| 2000/0506 | QLock ctl; ulong sectors; ulong secsize; | |
| 2000/0706 |
| |
| 2000/0809 | SDpart* part; /* nil or array of size npart */ int npart; | |
| 2000/0617 | ulong vers; | |
| 2000/0706 | SDperm ctlperm; | |
| 2000/0506 | ||
| 2000/0809/sys/src/9/port/sd.h:37,46 – 2000/1129/sys/src/9/port/sd.h:37,49 (short | long) | ||
|
Created.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0617 | ulong vers; | |
| 2000/0706 | SDperm ctlperm; | |
| 2000/0506 | ||
| 2000/1129 | QLock raw; /* raw read or write in progress */ | |
| 2000/0531 | Lock rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2000/1129 | Log log; | |
| 2000/0506 | } SDunit; typedef struct SDev { | |
| 2000/1129/sys/src/9/port/sd.h:9,16 – 2001/0527/sys/src/9/port/sd.h:9,16 (short | long) | ||
|
Convert to 9P2000 — change name and user to pointers.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0506 | typedef struct SDunit SDunit; | |
| 2000/0706 | typedef struct SDperm { | |
| 2000/0506 |
| |
| 2001/0527 | char *name; char *user; | |
| 2000/0506 | ulong perm; | |
| 2000/0706 | } SDperm; | |
| 2000/1129/sys/src/9/port/sd.h:50,56 – 2001/0527/sys/src/9/port/sd.h:50,56 | ||
| 2000/0506 | SDifc* ifc; /* pnp/legacy */ void *ctlr; int idno; | |
| 2001/0527 | char *name; | |
| 2000/0506 | int index; /* into unit space */ int nunit; SDev* next; | |
| 2001/0527/sys/src/9/port/sd.h:46,62 – 2001/0905/sys/src/9/port/sd.h:46,69 (short | long) | ||
|
In SDev: add Ref, change unit number. In SDifc, add probe, clear, stat.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/1129 | Log log; | |
| 2000/0506 | } SDunit; | |
| 2001/0905 | /* * Each controller is represented by a SDev, each controller is responsible * for allocating its unit structures. */ | |
| 2000/0506 | typedef struct SDev { | |
| 2001/0905 | Ref r; /* Number of callers using device */ | |
| 2000/0506 | SDifc* ifc; /* pnp/legacy */ void *ctlr; int idno; | |
| 2001/0527 | char *name; | |
| 2000/0506 |
| |
| 2001/0905 | int nunit; /* Number of units */ QLock unitlock; /* `Loading' of units */ int *unitflg; /* Unit flags */ SDunit **unit; /* Each controller has at least one unit */ | |
| 2000/0506 | } SDev; typedef struct SDifc { | |
| 2001/0527/sys/src/9/port/sd.h:75,80 – 2001/0905/sys/src/9/port/sd.h:82,90 | ||
| 2000/0506 | int (*wctl)(SDunit*, Cmdbuf*); long (*bio)(SDunit*, int, int, void*, long, long); | |
| 2001/0905 | SDev* (*probe)(DevConf *); void (*clear)(SDev *); char* (*stat)(SDev*, char*, char*); | |
| 2000/0506 | } SDifc; typedef struct SDreq { | |
| 2001/0905/sys/src/9/port/sd.h:9,16 – 2001/1022/sys/src/9/port/sd.h:9,16 (short | long) | ||
|
Format edits. Comment edits.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0506 | typedef struct SDunit SDunit; | |
| 2000/0706 | typedef struct SDperm { | |
| 2001/0527 |
| |
| 2001/1022 | char* name; char* user; | |
| 2000/0506 | ulong perm; | |
| 2000/0706 | } SDperm; | |
| 2001/0905/sys/src/9/port/sd.h:37,69 – 2001/1022/sys/src/9/port/sd.h:37,70 | ||
| 2000/0617 | ulong vers; | |
| 2000/0706 | SDperm ctlperm; | |
| 2000/0506 | ||
| 2000/1129 |
| |
| 2001/1022 | QLock raw; /* raw read or write in progress */ | |
| 2000/0531 | Lock rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2000/1129 |
| |
| 2001/1022 | Log log; | |
| 2000/0506 | } SDunit; | |
| 2001/0905 | /* | |
| 2001/1022 | * Each controller is represented by a SDev. * Each controller is responsible for allocating its unit structures. * Each controller has at least one unit. */ | |
| 2000/0506 | typedef struct SDev { | |
| 2001/0905 |
| |
| 2001/1022 | Ref r; /* Number of callers using device */ | |
| 2000/0506 | SDifc* ifc; /* pnp/legacy */ | |
| 2001/1022 | void* ctlr; | |
| 2000/0506 | int idno; | |
| 2001/0527 |
| |
| 2001/1022 | char* name; | |
| 2000/0506 | SDev* next; QLock; /* enable/disable */ int enabled; | |
| 2001/0905 |
| |
| 2001/1022 | int nunit; /* Number of units */ | |
| 2001/0905 | QLock unitlock; /* `Loading' of units */ | |
| 2001/1022 | int* unitflg; /* Unit flags */ SDunit**unit; | |
| 2000/0506 | } SDev; typedef struct SDifc { | |
| 2001/0905/sys/src/9/port/sd.h:82,89 – 2001/1022/sys/src/9/port/sd.h:83,90 | ||
| 2000/0506 | int (*wctl)(SDunit*, Cmdbuf*); long (*bio)(SDunit*, int, int, void*, long, long); | |
| 2001/0905 |
| |
| 2001/1022 | SDev* (*probe)(DevConf*); void (*clear)(SDev*); | |
| 2001/0905 | char* (*stat)(SDev*, char*, char*); | |
| 2000/0506 | } SDifc; | |
| 2001/1022/sys/src/9/port/sd.h:38,44 – 2002/0402/sys/src/9/port/sd.h:38,44 (short | long) | ||
|
Change rawinuse to a ulong.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0706 | SDperm ctlperm; | |
| 2000/0506 | ||
| 2001/1022 | QLock raw; /* raw read or write in progress */ | |
| 2000/0531 |
| |
| 2002/0402 | ulong rawinuse; /* really just a test-and-set */ | |
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2002/0402/sys/src/9/port/sd.h:42,49 – 2002/0404/sys/src/9/port/sd.h:42,47 (short | long) | ||
|
Remove Log.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2000/1129 | ||
| 2001/1022 |
| |
| 2000/0506 | } SDunit; | |
| 2001/0905 | /* | |
| 2002/0404/sys/src/9/port/sd.h:7,28 – 2002/0406/sys/src/9/port/sd.h:7,48 (short | long) | ||
|
Move typedefs to top. Add SDcache and SDwp.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0706 | typedef struct SDperm SDperm; | |
| 2000/0506 | typedef struct SDreq SDreq; typedef struct SDunit SDunit; | |
| 2002/0406 | typedef struct SDwp SDwp; typedef struct SDcache SDcache; | |
| 2000/0506 | ||
| 2000/0706 |
| |
| 2002/0406 | enum { SDcachesize = 20, }; struct SDperm { | |
| 2001/1022 | char* name; char* user; | |
| 2000/0506 | ulong perm; | |
| 2000/0706 |
| |
| 2002/0406 | }; | |
| 2000/0706 |
| |
| 2002/0406 | struct SDpart { | |
| 2000/0706 | ulong start; ulong end; SDperm; | |
| 2000/0506 | int valid; | |
| 2000/0617 | ulong vers; | |
| 2000/0506 |
| |
| 2002/0406 | }; | |
| 2000/0506 |
| |
| 2002/0406 | struct SDcache { ulong age; ulong bn; uchar *data; }; struct SDwp { QLock; ulong age; ulong start; ulong end; SDcache cache[SDcachesize]; }; struct SDunit { | |
| 2000/0506 | SDev* dev; int subno; uchar inquiry[256]; /* format follows SCSI spec */ | |
| 2002/0404/sys/src/9/port/sd.h:42,55 – 2002/0406/sys/src/9/port/sd.h:62,78 | ||
| 2000/0506 | int state; SDreq* req; | |
| 2000/0706 | SDperm rawperm; | |
| 2000/0506 |
| |
| 2002/0406 | int wpunit; /* whole unit is write protected */ SDwp *wp; /* block level write prtection */ }; | |
| 2001/0905 | /* | |
| 2001/1022 | * Each controller is represented by a SDev. * Each controller is responsible for allocating its unit structures. * Each controller has at least one unit. */ | |
| 2000/0506 |
| |
| 2002/0406 | struct SDev { | |
| 2001/1022 | Ref r; /* Number of callers using device */ | |
| 2000/0506 | SDifc* ifc; /* pnp/legacy */ | |
| 2001/1022 | void* ctlr; | |
| 2002/0404/sys/src/9/port/sd.h:63,71 – 2002/0406/sys/src/9/port/sd.h:86,94 | ||
| 2001/0905 | QLock unitlock; /* `Loading' of units */ | |
| 2001/1022 | int* unitflg; /* Unit flags */ SDunit**unit; | |
| 2000/0506 |
| |
| 2002/0406 | }; | |
| 2000/0506 |
| |
| 2002/0406 | struct SDifc { | |
| 2000/0506 | char* name; SDev* (*pnp)(void); | |
| 2002/0404/sys/src/9/port/sd.h:84,92 – 2002/0406/sys/src/9/port/sd.h:107,115 | ||
| 2001/1022 | SDev* (*probe)(DevConf*); void (*clear)(SDev*); | |
| 2001/0905 | char* (*stat)(SDev*, char*, char*); | |
| 2000/0506 |
| |
| 2002/0406 | }; | |
| 2000/0506 |
| |
| 2002/0406 | struct SDreq { | |
| 2000/0506 | SDunit* unit; int lun; int write; | |
| 2002/0404/sys/src/9/port/sd.h:100,106 – 2002/0406/sys/src/9/port/sd.h:123,129 | ||
| 2000/0506 | int status; long rlen; uchar sense[256]; | |
| 2002/0406 | }; | |
| 2000/0506 | enum { SDnosense = 0x00000001, | |
| 2002/0406/sys/src/9/port/sd.h:47,53 – 2003/0407/sys/src/9/port/sd.h:47,52 (short | long) | ||
|
Remove SDunit.rendez.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/0506 | int subno; uchar inquiry[256]; /* format follows SCSI spec */ | |
| 2000/0706 | SDperm; | |
| 2000/0506 |
| |